/* Shared typography and readable entry points. Loaded after the visual theme.
   The art theme owns geometry/effects; this file owns ordinary UI text. */
:root {
  --font-readable: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --front-font-ui: var(--font-readable);
  --front-font-title: var(--font-readable);
  --front-font-display: var(--font-readable);
}
body, body.art-theme, body:not(.admin-body), body.admin-body {
  font-family:var(--font-readable)!important;
  font-weight:400!important;
  font-size:15px!important;
  font-synthesis:none;
  text-rendering:auto;
  letter-spacing:0;
  line-height:1.6;
}
html body :is(h1,h2,h3,h4,p,small,label,input,textarea,select,button,.btn,b,strong,em,.muted,.tag,.notice,.price),
html body:not(.admin-body) :is(h1,h2,h3,h4,p,small,label,input,textarea,select,button,.btn,.btn.gold,b,strong,em,.muted,.tag,.notice,.price),
html body.art-theme :is(h1,h2,h3,h4,p,small,label,input,textarea,select,button,.btn,.btn.gold,b,strong,em,.muted,.tag,.notice,.price) {
  font-family:var(--font-readable)!important;
  text-shadow:none!important;
  -webkit-text-stroke:0!important;
  font-synthesis:none;
}
html body :is(p,small,label,.muted,.notice,td,li),
html body:not(.admin-body) :is(p,small,label,.muted,.notice,td,li) {font-weight:400!important}
body :is(b,strong,h1,h2,h3,h4,button,.btn,th) {font-weight:700!important}
html body .story-screen .story-paragraph {font-weight:500!important}
body :is(p,label,td,li) {overflow-wrap:anywhere}
body .small, body small {font-size:13px;line-height:1.6}
body :is(input,textarea,select) {font-size:16px!important;font-weight:400!important}
body :is(button,.btn) {text-shadow:none!important;line-height:1.45}
body.art-theme :is(.hud-player-copy,.lobby-ground-name,.v25-fighter-title,.v25-hp-text,.v25-skill-line-head,.automatic-effect-note,.slot-rule-note,.journey-kicker,.map-card-reward,.player-level-progress-head,.inventory-capacity,.exchange-tag) {text-shadow:none!important;-webkit-text-stroke:0!important}
body :is(.journey-head,.shop-page-head,.inventory-page-head) {
  background-image:linear-gradient(90deg,#07101be8,#07101ba8),var(--asset-map-desktop)!important;
}
body.player-v25-body :is(.journey-head,.shop-page-head,.inventory-page-head) p {
  display:block!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;
  overflow:visible!important;text-overflow:clip!important;max-height:none!important;
  font-size:15px!important;line-height:1.65!important;color:#e5eaf1!important;white-space:normal!important;
}
body.player-v25-body .map-earnings-summary small {font-size:14px!important;line-height:1.65!important;color:#e0e6ee!important}
body.player-v25-body .map-earnings-summary b {font-size:17px!important}
body.player-v25-body :is(.wallet-mini,.player-level-progress-head,.level-progress-head) {font-size:13px!important;line-height:1.6!important}
body.player-v25-body .player-hud.player-hud-v5 .hud-player-copy>b {font-size:16px!important;line-height:1.4!important}
body.player-v25-body .player-hud.player-hud-v5 .hud-player-copy>small,
body.player-v25-body .player-hud.player-hud-v5 .hud-player-copy .hud-progress-copy,
body.player-v25-body .player-hud.player-hud-v5 .hud-player-copy .hud-progress-copy :is(span,em) {
  font-size:12px!important;line-height:1.5!important;font-weight:500!important;letter-spacing:0!important;text-shadow:none!important;
}
body.player-v25-body .player-hud.player-hud-v5 .hud-player-copy {min-width:0!important}
body.player-v25-body .player-bottom-nav a b {font-size:13px!important;line-height:1.4!important;text-shadow:none!important}
body.art-theme.player-v25-body .game-lobby .lobby-ground-name>span {font-size:14px!important;white-space:normal!important;line-height:1.5!important}
body.art-theme.player-v25-body .game-lobby .lobby-ground-name .lobby-name-row b {font-size:19px!important}
body.player-v25-body .lobby-main-btn small,body.player-v25-body .lobby-notice-row {font-size:14px!important;line-height:1.55!important}
body.player-v25-body .lobby-xp-card>div:first-child>span:first-child {font-size:14px!important;line-height:1.5!important}
body.player-v25-body .shop-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important}
body.player-v25-body .shop-card {min-width:0!important;display:flex!important;flex-direction:column!important}
body.player-v25-body .shop-card h3 {font-size:20px!important;line-height:1.45!important;overflow-wrap:anywhere}
body.player-v25-body .shop-card :is(p,.effect,.exchange-tag,.muted) {
  display:block!important;font-size:15px!important;line-height:1.7!important;font-weight:400!important;
  -webkit-line-clamp:unset!important;line-clamp:unset!important;max-height:none!important;
  overflow:visible!important;text-overflow:clip!important;white-space:pre-line!important;
}
body.player-v25-body .shop-card :is(small,label,.small) {font-size:13px!important;line-height:1.55!important}
body.player-v25-body .shop-card p.exchange-tag {color:var(--tag-color,#e6c879)!important}
body.player-v25-body .shop-card .price {font-size:21px!important;line-height:1.5!important}
body.player-v25-body .shop-card :is(button,.btn) {min-height:44px!important;font-size:14px!important;white-space:normal!important}
body.player-v25-body .shop-card form {margin-top:auto;display:flex;align-items:center;flex-wrap:wrap;gap:9px}
body.player-v25-body .shop-card form input {width:72px;min-height:44px;max-width:100%}
body.player-v25-body :is(.shop-page-head,.inventory-page-head) {gap:18px!important;align-items:center!important}
body.player-v25-body :is(.shop-page-head,.inventory-page-head)>.row-actions {display:flex!important;gap:10px!important;flex-wrap:wrap!important;align-items:stretch!important}
body.player-v25-body .shop-page-head a[href="/shop/auction"],
body.player-v25-body .inventory-page-head .row-actions a {
  min-width:112px!important;min-height:48px!important;padding:11px 20px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  font-size:16px!important;line-height:1.45!important;text-align:center!important;box-sizing:border-box!important;
  border-radius:10px!important;text-shadow:none!important;box-shadow:0 3px 12px #0004!important;
}
body.player-v25-body .shop-page-head a[href="/shop/auction"] {border:1px solid #edcd83!important;background:linear-gradient(120deg,#f5dfa5,#d3a754)!important;color:#231b0b!important}
body.player-v25-body .inventory-page-head .row-actions {min-width:130px}
body.player-v25-body .inventory-page-head .row-actions a {width:100%!important}
body.player-v25-body :is(.automatic-effect-note,.slot-rule-note,.inventory-rule,.inventory-rules,.inventory-rule-note,.inventory-auto-note,.inventory-page-head p,.inventory-capacity) {font-size:15px!important;line-height:1.65!important;font-weight:400!important;background-color:#101b2bef!important;color:#e4eaf3!important}
body.player-v25-body .inventory-slot :is(b,h3) {font-size:14px!important;line-height:1.5!important}
body.player-v25-body .inventory-slot :is(small,.muted) {font-size:12px!important;line-height:1.5!important}
body.player-v25-body .world-map-card[data-map-card] p {font-size:14px!important;line-height:1.65!important}
body.player-v25-body .world-map-card[data-map-card] .map-card-affix {font-size:inherit!important;line-height:inherit!important}
body.player-v25-body :is(.wallet-card,.wallet-v25-card,.notice,.card) p {font-size:15px!important;line-height:1.65!important}
body.player-v25-body :is(.wallet-card,.wallet-v25-card) :is(button,.btn) {font-size:15px!important;min-height:44px!important}
body.admin-body :is(.small,.muted,small,.admin-field label,.admin-nav-section>summary) {font-size:14px!important;line-height:1.6!important}
body.admin-body :is(.admin-nav-link,.admin-content p,label,td,th) {font-size:15px!important;line-height:1.6!important}
body.admin-body :is(button,.btn) {font-size:14px!important;min-height:44px}
body.admin-body :is(h1,h2,h3) {color:#f5ecdc!important;-webkit-text-fill-color:currentColor;background-clip:border-box;-webkit-background-clip:border-box}
body.admin-body .admin-title {background:none!important}

/* The ordinary textarea remains the submitted source of truth. */
body.admin-body textarea[data-tag-source="1"] {display:none!important}
.color-tag-editor,.copy-color-editor {min-width:0;width:100%;box-sizing:border-box;margin:8px 0}
.exchange-form .color-tag-field {grid-column:1/-1}
.color-tag-rows {display:grid;gap:12px}
.color-tag-row {display:grid;grid-template-columns:minmax(0,1fr) 52px 44px;gap:8px;align-items:center;padding:12px;border:1px solid #627087;border-radius:10px;background:#111c2c}
.color-tag-row .tag-color-picker {width:52px;height:44px;min-height:44px}
.color-tag-row .tag-remove {min-width:44px;padding:8px}
.color-tag-swatches {display:flex;gap:6px;flex-wrap:wrap;grid-column:1/-1}
body.admin-body .color-tag-swatches button {background:var(--swatch)!important;color:#0a1321!important;border:2px solid #a4b1c3!important;border-radius:6px!important;width:36px;min-width:36px;height:36px;min-height:36px;font-size:12px!important;padding:2px;text-shadow:none!important;box-shadow:none!important}
body.admin-body .color-tag-swatches button[aria-pressed="true"] {outline:2px solid #fff;outline-offset:2px;border-color:#0a1321!important}
.color-tag-preview {grid-column:1/-1;min-height:28px;margin:0!important;padding:7px 9px;background:#0a1321;border-radius:6px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px!important;line-height:1.6!important}
.color-tag-help {margin:7px 0;font-size:13px!important;color:#c0cbdc}
.color-tag-editor>.tag-add {margin-top:10px}
.copy-color-toolbar {display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:8px 0}
.copy-color-toolbar input[type="color"] {width:52px;min-height:44px}
.copy-color-preview {background:#101b2b;border:1px solid #627087;border-radius:8px;padding:12px;min-height:48px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.copy-color-editor>p {margin:6px 0}
@media(max-width:1000px) {
  body.player-v25-body .shop-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:700px) {
  /* Download is optional; removing it must remove its grid track as well. */
  body.player-v25-body .player-game-shell>.player-hud.player-hud-v5:not(:has(>.hud-install)) {
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"profile" "balance"!important;
  }
}
@media(max-width:600px) {
  body.player-v25-body .shop-grid {grid-template-columns:minmax(0,1fr)!important}
  body.player-v25-body .shop-card :is(p,.effect,.exchange-tag,.muted) {font-size:16px!important}
  body.player-v25-body :is(.shop-page-head,.inventory-page-head) {display:flex!important;flex-direction:column!important;align-items:stretch!important;padding:18px!important}
  body.player-v25-body :is(.shop-page-head,.inventory-page-head)>.row-actions {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%;min-width:0}
  body.player-v25-body .shop-page-head .row-actions a[href="/shop/auction"] {grid-column:1/-1}
  body.player-v25-body .inventory-page-head .row-actions a {min-width:0!important;width:100%!important;padding:11px 10px!important}
  body.player-v25-body .player-bottom-nav a b {font-size:12px!important}
  .color-tag-row {grid-template-columns:minmax(0,1fr) 48px 44px;padding:9px;gap:7px}
  body.admin-body .color-tag-swatches button {width:40px;height:40px;min-width:40px;min-height:40px}
}

/* 2026-09-11: keep welcome text centered on its own lobby stage. */
body.player-v25-body.v25-lobby-body .game-lobby.lobby-layout-v5 .lobby-world-title .lobby-title-welcome,
body.player-v25-body.v25-lobby-body .game-lobby.lobby-layout-v5 .lobby-mobile-welcome {
  box-sizing:border-box!important;
  text-align:center!important;
  align-self:center!important;
  justify-self:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
  width:100%!important;
  max-width:620px!important;
  overflow-wrap:anywhere;
}
body.player-v25-body.v25-lobby-body .game-lobby.lobby-layout-v5 .lobby-mobile-welcome {
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  grid-column:1 / -1!important;
}
body.player-v25-body .inventory-affixes {margin:8px 0;min-width:0;}
body.player-v25-body .inventory-affix {margin:4px 0;font-size:13px!important;line-height:1.5!important;white-space:pre-wrap;overflow-wrap:anywhere;}
body.player-v25-body .map-detail-extras {margin:10px 0;min-width:0;}
body.player-v25-body .map-detail-extras p {margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere;}
body.player-v25-body .map-detail-level {width:fit-content;max-width:100%;border-radius:999px;padding:5px 12px;}

/* SDT copy 2026-09-16: mobile inventory must retain purchased equipment affixes. */
body.player-v25-body .inventory-slot .inventory-affix {display:block!important;max-width:100%;}
body.player-v25-body .inventory-affixes {display:block!important;}
body.player-v25-body .shop-quantity-label {display:flex;align-items:center;gap:8px;}
body.player-v25-body .map-card-equipment .map-card-equipment-label {display:block;}
body.player-v25-body .map-card-equipment .map-card-affix {display:inline;margin:0;padding:0;}

/* Selected and event stages keep the same circle size. */
body.player-v25-body .journey-node .journey-medal {transform:none!important;animation:none!important;flex-shrink:0;}
