/* 墨线分镜 · 补给站 + 详情页 + 暂停页（W1-E 负责）。规格见 docs/superpowers/specs/2026-10-13-ink-panels-ui-design.md */

/* 旧全局的效果数值着色是暗底配色（styles.css .fx-pos），这里在白底/纸面上改用组件库令牌 */
.ink-screen .fx-pos, .ink-overlay .fx-pos { color: var(--gain); font-weight: 900; }
.ink-screen .fx-neg, .ink-overlay .fx-neg { color: var(--loss); font-weight: 900; }

/* ---------- 补给站 ---------- */
.ink-shop { background: var(--paper); }
.ink-shop__deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ink-shop__deco i { position: absolute; right: -70px; top: 120px; width: 300px; height: 300px; border-radius: 50%; opacity: .1; }
.ink-shop .ink-topbar { padding-bottom: 2px; }
.ink-shop__sub {
  position: relative; z-index: 2; flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 4px 16px 8px 12px;
}
.ink-shop__gap { flex: 1; }
/* 疾羽教学关的通讯小窗（#tutorial-comm.is-shop）固定压在顶部 6px 起、最高 84px，货架计数与刷新要让到它下面 */
.ink-shop.is-tutorial .ink-shop__sub { padding-top: 40px; }
.ink-shop__refresh svg { display: block; }
.ink-shop__scroll { position: relative; z-index: 1; }
.ink-shop__empty { grid-column: 1 / -1; margin: 24px 0; text-align: center; font-weight: 900; color: #555; }

.ink-shop__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px;
  padding: 8px 14px 4px 12px;
}

/* 商品格：左侧稀有度条纹、黑底图标、右下爆炸贴价格 */
.ink-shop-card {
  --rot: 0deg;
  position: relative;
  display: flex; min-height: 128px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(var(--rot));
  transition: transform .15s var(--ease-out);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ink-shop-card:nth-child(4n+1) { --rot: -1.2deg; }
.ink-shop-card:nth-child(4n+2) { --rot: .9deg; }
.ink-shop-card:nth-child(4n+3) { --rot: .6deg; }
.ink-shop-card:nth-child(4n) { --rot: -.8deg; }
.ink-shop-card:active { transform: rotate(var(--rot)) scale(.97); }
.ink-shop-card.is-sold { cursor: default; }
.ink-shop-card.is-sold:active { transform: rotate(var(--rot)); }
.ink-shop-card__band {
  flex: none; width: 14px;
  background: repeating-linear-gradient(-45deg, var(--r) 0 5px, var(--ink) 5px 7px);
  border-right: 3px solid var(--ink);
}
.ink-shop-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 7px 8px 8px 8px; }
.ink-shop-card__top { display: flex; align-items: center; gap: 7px; }
.ink-shop-card__id { min-width: 0; }
.ink-shop-card__name { font-weight: 900; font-size: 15px; line-height: 1.1; overflow-wrap: anywhere; }
.ink-shop-card__tag {
  display: inline-block; margin-top: 2px; padding: 0 4px;
  border: 2px solid var(--ink); background: var(--r); color: var(--white);
  font-weight: 900; font-size: 10px; line-height: 1.4; white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(17, 17, 17, .7);
}
.ink-shop-card.is-t1 .ink-shop-card__tag { color: var(--ink); text-shadow: none; }
.ink-shop-card__desc {
  font-weight: 700; font-size: 11px; line-height: 1.35; color: #333;
  /* 最多 2 行：右下角价格爆炸贴从卡片顶部量起 y≈106 才开始，2 行文字（含名字折成两行的情况）在 y≈101 前结束，不会被盖住；完整文案在放大弹层里 */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.ink-shop-card__price { position: absolute; right: -12px; bottom: -20px; pointer-events: none; }
.ink-shop-card__price.is-3 .ink-burst { font-size: 15px; }
.ink-shop-card__advice { margin: 0; padding: 5px 16px 8px 0; border-top: 1px dashed var(--ink); font-size: 10px; line-height: 1.4; font-weight: 800; overflow-wrap: anywhere; }
.ink-build-advice { padding: 10px; border: 2px solid var(--ink); background: var(--paper); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.ink-build-advice ul { margin: 6px 0; padding-left: 16px; }
.ink-build-advice small { display: block; color: #555; }
.ink-shop-card__lock {
  position: absolute; left: -12px; top: 12px; width: 70px; z-index: 2;
  transform: rotate(-32deg); font-size: 11px; pointer-events: none;
}
.ink-shop-card__veil {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: rgba(243, 238, 227, .72);
}

/* 武器栏 6 格 */
.ink-shop__inv { padding: 16px 16px 4px 14px; }
.ink-shop__inv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-weight: 900; font-size: 13px; }
.ink-shop__inv-head small { font-weight: 800; font-size: 11px; color: #555; }
.ink-shop__slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }

/* 图标方块：武器栏、详情里的武器与道具共用 */
.ink-shop-tile {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0;
  background: #000; border: 3px solid var(--ink); overflow: visible;
}
.ink-shop-tile.is-empty { background: var(--paper-2); border: 3px dashed #9a927d; }
.ink-shop-tile .ink-icon { width: 100%; height: 100%; }
.ink-shop-tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--r, var(--paper-3)); }
.ink-shop-tile.is-empty::after { display: none; }
.ink-shop-tile > em {
  position: absolute; right: 3px; bottom: 7px; z-index: 1;
  font-style: normal; font-size: 11px; line-height: 1; color: var(--white);
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill;
}
.ink-shop-tile__merge {
  position: absolute; top: -10px; right: -8px; z-index: 2;
  background: var(--yellow); border: 2px solid var(--ink);
  font-weight: 900; font-size: 10px; line-height: 1; padding: 2px 3px;
  transform: rotate(12deg);
  animation: ink-shop-bob 1s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes ink-shop-bob { to { transform: rotate(12deg) translateY(-3px); } }

.ink-shop__foot {
  position: relative; z-index: 2; flex: none;
  display: flex; gap: 14px;
  padding: 10px 18px calc(16px + var(--safe-bottom)) 14px;
}
.ink-shop__detail { flex: 0 0 31%; }
.ink-shop__next { flex: 1; min-width: 0; }

/* ---------- 放大格弹层（商品、武器、道具说明共用） ---------- */
.ink-zoom { width: min(100%, 330px); }
.ink-zoom .ink-modal__head { padding: 12px 14px; }
.ink-zoom__head { min-width: 0; display: flex; align-items: center; gap: 12px; }
.ink-zoom__id { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ink-zoom__name {
  font-weight: 900; font-size: 26px; line-height: 1.05; color: var(--white);
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; overflow-wrap: anywhere;
}
.ink-zoom__desc { margin: 0; font-weight: 800; font-size: 14px; line-height: 1.5; }
.ink-zoom__notes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ink-zoom__cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.ink-zoom__cells .ink-cell.is-cjk .ink-cell__v { font-family: var(--font-cjk); font-weight: 900; font-size: 16px; line-height: 1.5; }
.ink-zoom__price { margin: 10px 0 0; font-weight: 800; font-size: 12px; color: #444; }
.ink-zoom__price b { font-size: 15px; color: var(--ink); }

/* ---------- 详情组件（商店整屏弹层 / 暂停页内嵌） ---------- */
.ink-det {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
}
.ink-det--pause { border: 4px solid var(--ink); box-shadow: var(--shadow-lg); }
.ink-det__title { flex: none; padding: 2px 16px 6px; }
.ink-det__head { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 14px 4px 14px; }
.ink-det__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ink-det__name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 900; font-size: 21px; line-height: 1.1; }
.ink-det__x {
  flex: none; width: 46px; height: 46px;
  background: var(--red); color: var(--white); border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900; font-size: 24px; line-height: 1; transform: rotate(6deg);
}
.ink-det__body { padding: 2px 14px 22px 14px; }
.ink-det__sec { margin: 10px 0 8px; }
.ink-det__sec:first-child { margin-top: 4px; }
.ink-det__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ink-det__grid .ink-cell__k { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.ink-det__cap { font-family: var(--font-cjk); font-weight: 700; font-size: 10px; color: #777; letter-spacing: 0; white-space: nowrap; }
.ink-det__none { margin: 4px 0 8px; font-weight: 800; font-size: 13px; color: #666; }

.ink-det__weapons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding-right: 4px; }
.ink-det-wpn {
  position: relative; display: flex; align-items: center; gap: 8px; min-height: 58px; min-width: 0;
  padding: 5px 6px 5px 5px; text-align: left;
  background: var(--white); border: 2.5px solid var(--ink); border-left: 8px solid var(--r, var(--ink)); box-shadow: 3px 3px 0 var(--ink);
}
.ink-det-wpn.is-empty {
  justify-content: center; background: var(--paper-2); border: 2.5px dashed #9a927d; box-shadow: none;
  font-weight: 800; font-size: 12px; color: #777;
}
.ink-det-wpn__text { min-width: 0; display: flex; flex-direction: column; }
.ink-det-wpn__text b { font-weight: 900; font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.ink-det-wpn__text small { font-weight: 800; font-size: 10px; color: #555; }
.ink-det__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 10px; padding-right: 4px; }

.ink-det-row {
  margin-bottom: 8px; padding: 6px 10px;
  background: var(--white); border: 2.5px solid var(--ink); border-left: 8px solid var(--r, var(--ink));
}
.ink-det-row__title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 900; font-size: 14px; }
.ink-det-row p { margin: 4px 0 0; font-weight: 700; font-size: 12px; line-height: 1.45; color: #333; }

.ink-det-skill {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; padding: 8px 10px 8px 6px;
  background: var(--white); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.ink-det-skill.is-empty { align-items: center; background: var(--paper-2); border-style: dashed; box-shadow: none; font-weight: 800; font-size: 13px; color: #666; }
.ink-det-skill__no {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 2px;
  background: var(--yellow); border: 2px solid var(--ink); font-size: 15px; line-height: 1;
}
.ink-det-skill.is-empty .ink-det-skill__no { background: var(--paper-3); }
.ink-det-skill__text { flex: 1; min-width: 0; }
.ink-det-skill__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 900; font-size: 15px; }
.ink-det-skill__text p { margin: 4px 0 0; font-weight: 700; font-size: 12px; line-height: 1.45; color: #333; }
.ink-det-skill__cd { display: block; margin-top: 4px; font-weight: 900; font-size: 11px; color: var(--loss); }

/* 商店里的整屏弹层：纸面铺满，从下方升起 */
.ink-det-overlay { padding: 0; align-items: stretch; justify-content: stretch; background: var(--paper); }
.ink-det-overlay .ink-det { padding-top: var(--safe-top); animation: ink-rise .28s var(--ease-out) both; }

/* ---------- 暂停 ---------- */
/* 底下的战场由 Game.render 在 pause 视图画出，这里只压 55% 墨黑 */
.ink-pause { align-items: center; background: rgba(17, 17, 17, .55); }
.ink-pause__panel {
  position: relative; flex: 1; min-height: 0; width: min(100%, 450px);
  display: flex; flex-direction: column;
  padding: 0 14px calc(16px + var(--safe-bottom)) 14px;
}
.ink-pause__title { flex: none; padding: calc(var(--safe-top) + 4px) 6px 14px; }
.ink-pause__det { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ink-pause__foot { flex: none; display: flex; align-items: center; gap: 14px; padding: 18px 6px 0 4px; }
.ink-pause__go { flex: 1; min-width: 0; }
