/* 沧溟航迹 — 经典 WAP 信息架构 + 可读排版
   白/浅底蓝链保留；色值对齐 UBB COLOR/GLOW/FLY；非卡片仪表盘 */
:root {
  --bg-page: #f2f5f8;
  --bg-app: #ffffff;
  --ink: #111;
  --muted: #666;
  --link: #0000cc;
  --link-hover: #000099;
  --link-visited: #551a8b;
  --sys: #cc0000;
  --ok: #1a6b2e;
  --hot: #cc0000;
  --dim: #888;
  --line: #ccc;
  --line-soft: #e0e0e0;
  --wash-sys: rgba(204, 0, 0, 0.05);
  --wash-sea: rgba(0, 0, 204, 0.03);
  --wash-gold: rgba(154, 110, 20, 0.06);

  /* 强化前缀 +1~+10（浅白略加深以保证白底可读） */
  --enh0: #8a94a0;
  --enh1: #9aa0a8;
  --enh2: #9aa0a8;
  --enh3: #9aa0a8;
  --enh4: #c01818;
  --enh5: #d46a12;
  --enh6: #b08a18;
  --enh7: #1a7a32;
  --enh8: #0a8a8a;
  --enh9: #0a3d9c;
  --enh10: #7a1aaa;

  /* 装备品质 */
  --q-white: #3a4450;
  --q-green: #1a7a32;
  --q-blue: #0a3d9c;
  --q-purple: #7a1aaa;
  --q-orange: #d46a12;
  --q-gold: #9a6e14;

  /* 材料 */
  --mat-white: #5a6674;
  --mat-green: #1a7a32;
  --mat-blue: #0a3d9c;
  --mat-purple: #7a1aaa;
  --mat-orange: #d46a12;
  --mat-gold: #9a6e14;

  /* 战斗日志 */
  --bat-normal: #2a3340;
  --bat-fire: #c01818;
  --bat-heal: #1a7a32;
  --bat-para: #7a1aaa;
  --bat-armor: #6a7480;
  --bat-ult: #9a6e14;
  --bat-shield: #7a6a48;
  --bat-stun: #b05080;
  --bat-fenhun: #a01010;
  --bat-strip: #6a7480;
  --bat-cleanse: #5a6674;

  --khaki: #7a6a48;
  --recharge-gold: #9a6e14;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-brand: "Noto Serif SC", "Songti SC", "STSong", serif;
  --tap: 10px 0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  /* 白底为主，极淡海雾不抢戏 */
  background-color: var(--bg-page);
  background-image:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(160, 190, 210, 0.12), transparent 50%);
  background-attachment: fixed;
}

#app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 8px 12px 28px;
  background: #fff;
  box-shadow: none;
}

/* —— 顶栏品牌 —— */
.topbar {
  text-align: center;
  padding: 4px 0 8px;
  margin: 0 0 6px;
  border-bottom: 1px solid var(--line);
  background: none;
}
.brand {
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ink);
  line-height: 1.3;
}
.topmeta { display: none; }

/* —— 地点行：名 + 快捷链分区 —— */
.loc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 2px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px dotted var(--line-soft);
  color: var(--ink);
}
.loc-name {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  margin-right: 2px;
  flex: 1 1 auto;
  min-width: 40%;
}
.quick {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  font-size: 0.92rem;
  line-height: 1.8;
}
.quick a, .quick .lnk {
  margin-right: 0;
  padding: 2px 0;
}

/* —— 链接：蓝 + 下划线（旧 WAP） —— */
a, .lnk, button, .btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  font: inherit;
  cursor: pointer;
  display: inline;
  line-height: inherit;
}
a:hover, .lnk:hover, button:hover {
  color: var(--link-hover);
}
a:visited { color: var(--link-visited); }
button:disabled, .lnk.disabled, a.disabled {
  color: var(--dim);
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}
button.primary, .lnk.primary {
  color: var(--link);
  font-weight: 700;
}
button.danger, .bad, .lnk.danger { color: var(--sys); }
button.ok, .ok { color: var(--ok); }
.hot {
  color: var(--hot);
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: super;
  text-decoration: none;
  margin-left: 2px;
  letter-spacing: 0.02em;
}

/* —— 区块：无卡片 —— */
.panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 14px;
}
.panel h2 {
  margin: 0 0 8px;
  font-family: var(--font-brand);
  font-size: 1.08rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.panel h3 {
  margin: 14px 0 6px;
  font-size: 0.98rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding-bottom: 2px;
  border-bottom: 1px dotted var(--line-soft);
}

.log {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 6px 0 10px;
}
.log .dim, .dim, .muted { color: var(--muted); }
.log .gold { color: var(--q-gold); }
.log .ok { color: var(--ok); }
.log .bad, .bad { color: var(--sys); }
.log .sea { color: var(--link); }

/* —— 系统红字区 —— */
.sys-log {
  margin: 0 0 8px;
  padding: 0;
  background: none;
  border: none;
}
.sys-log .sys-line {
  color: var(--sys);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 2px;
}
.sys-log .sys-line.ok { color: var(--ok); }
.sys-log .sys-line.sea { color: var(--link); }
.sys-log .sys-line.dim { color: var(--muted); }
.sys-log .sys-line.gold { color: var(--q-gold); }
.sys-log .sys-line.sys { color: var(--sys); }

/* —— 你看见 —— */
.see-block {
  margin: 12px 0;
  padding: 2px 0 4px;
}
.see-label {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.see-list {
  margin: 0;
  padding: 0 0 0 2px;
  list-style: none;
}
.see-list li {
  margin: 0;
  padding: 5px 0;
  line-height: 1.55;
  border-bottom: 1px dotted transparent;
}
.see-list li:hover {
  border-bottom-color: var(--line-soft);
}
.see-list.inline li {
  display: inline;
  padding: 0;
  border: none;
}
.see-list.inline li::after { content: "，"; color: var(--ink); }
.see-list.inline li:last-child::after { content: ""; }

/* —— 头顶！？ —— */
.head-mark {
  font-weight: 700;
  margin-right: 2px;
  letter-spacing: 0;
  font-size: 1.05em;
}
.head-mark-inline {
  display: inline;
  margin-right: 2px;
  vertical-align: baseline;
}
.head-mark-sm {
  font-size: 0.85em;
  font-weight: 600;
}
.head-mark-dim,
.head-mark.head-mark-dim {
  opacity: 0.45;
  filter: grayscale(0.35);
}
.head-mark-line {
  line-height: 1.2;
  margin: 0 0 2px;
  min-height: 1.1em;
}
.head-mark-flash {
  animation: cm-head-flash 1.1s ease-in-out infinite;
}
@keyframes cm-head-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
a .head-mark, .lnk .head-mark {
  text-decoration: none;
}

/* —— 方向 2×2 —— */
.dir-block {
  margin: 14px 0 12px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--line-soft);
}
.dir-block .see-label { margin-bottom: 8px; }
.dir-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  max-width: 340px;
}
.dir-cell {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 2px 0;
}
.dir-cell .dir-tag {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  margin-right: 2px;
}

/* —— 大链：【城内地图】气质 —— */
.big-links {
  margin: 10px 0 8px;
  padding: 4px 0;
  text-align: left;
  line-height: 1.8;
  border: none;
  background: none;
}
.big-links .lnk, .big-links a, .big-links button {
  display: inline;
  margin: 0 12px 0 0;
  padding: 4px 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-underline-offset: 3px;
  min-height: 0;
}
.big-links .lnk.disabled, .big-links span.lnk.disabled {
  display: inline;
  padding: 4px 0;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.big-links .hint {
  display: none;
}

.spot-blurb {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* —— 底栏 —— */
.foot-nav {
  margin-top: 18px;
  padding: 12px 4px 4px;
  border-top: 2px solid var(--line);
  text-align: center;
  font-size: 0.95rem;
  line-height: 2;
  background: linear-gradient(180deg, rgba(228, 236, 243, 0.45), transparent);
}
.foot-nav .sep {
  color: var(--dim);
  text-decoration: none;
  margin: 0 6px;
  pointer-events: none;
}
.foot-nav .off {
  color: var(--dim);
  text-decoration: line-through;
}
.foot-nav .lnk, .foot-nav a {
  padding: 4px 2px;
}

.btns {
  display: block;
  margin-top: 8px;
  line-height: 2;
}
.btns button, .btns .lnk, .btns a {
  display: inline;
  margin-right: 14px;
  padding: 4px 0;
}
.btns.stack button, .btns.stack .lnk, .btns.stack a {
  display: block;
  margin: 4px 0;
  padding: 6px 0;
  line-height: 1.6;
}

.row {
  display: block;
  padding: 8px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 0.92rem;
  line-height: 1.55;
}
.row:last-child { border-bottom: none; }
.row .acts { display: inline; margin-left: 10px; }
.row .acts button { margin-right: 8px; }
.item-list { margin: 4px 0 8px; }

.main-obj {
  margin: 6px 0 10px;
  padding: 6px 0;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.5;
}
.quest-main, .quest-main-banner {
  color: #8a5a10;
  background: var(--wash-gold);
  padding: 6px 8px;
  margin: 4px 0 10px;
}
.quest-side { color: #1a5f9e; }
.lnk.quest-main.primary { color: #7a5200; }
.lnk.quest-side.primary { color: #0d4a80; }
.small { font-size: 0.84rem; line-height: 1.55; color: var(--muted); }

/* —— 强化前缀 —— */
.enh-0 { color: var(--enh0); }
.enh-low, .enh-1, .enh-2, .enh-3 { color: var(--enh1); }
.enh-4 { color: var(--enh4); text-shadow: 0 0 4px rgba(192, 24, 24, 0.25); }
.enh-5 { color: var(--enh5); text-shadow: 0 0 3px rgba(212, 106, 18, 0.3); }
.enh-6 { color: var(--enh6); animation: enh-spin-star 2.8s linear infinite; }
.enh-7 { color: var(--enh7); text-shadow: 0 0 5px rgba(26, 122, 50, 0.28); }
.enh-8 { color: var(--enh8); text-shadow: 0 0 6px rgba(10, 138, 138, 0.35); }
.enh-9 { color: var(--enh9); text-shadow: 0 0 2px #4af, 0 0 6px rgba(10, 61, 156, 0.45); }
.enh-10 { color: var(--enh10); font-weight: 700; }

@keyframes enh-spin-star {
  0% { text-shadow: 0 0 2px rgba(176, 138, 24, 0.2); }
  50% { text-shadow: 0 0 6px rgba(176, 138, 24, 0.55), 0 0 10px rgba(212, 184, 74, 0.25); }
  100% { text-shadow: 0 0 2px rgba(176, 138, 24, 0.2); }
}

.enh-full10 {
  display: block;
  margin-top: 4px;
  line-height: 1.55;
  color: var(--q-gold);
  font-weight: 700;
}
.set-bright .set-active,
.set-bright {
  filter: brightness(1.35);
  text-shadow: 0 0 4px #c9a227, 0 0 10px rgba(154, 110, 20, 0.45);
}

/* —— 品质底色 —— */
.q-white { color: var(--q-white); }
.q-green { color: var(--q-green); }
.q-blue { color: var(--q-blue); }
.q-purple { color: var(--q-purple); font-weight: 700; }
.q-orange { color: var(--q-orange); font-weight: 700; }
.q-gold { color: var(--q-gold); font-weight: 700; }

/* —— 材料分层 —— */
.mat-white { color: var(--mat-white); }
.mat-green { color: var(--mat-green); }
.mat-blue { color: var(--mat-blue); }
.mat-purple { color: var(--mat-purple); font-weight: 700; }
.mat-orange { color: var(--mat-orange); font-weight: 700; }
.mat-gold { color: var(--mat-gold); font-weight: 700; }
.mat-rainbow {
  font-weight: 700;
  background: linear-gradient(90deg, #c01818, #d46a12, #b08a18, #1a7a32, #0a8a8a, #0a3d9c, #7a1aaa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* —— 战斗日志 —— */
.bat-normal { color: var(--bat-normal); }
.bat-fire { color: var(--bat-fire); }
.bat-heal { color: var(--bat-heal); }
.bat-para { color: var(--bat-para); }
.bat-armor { color: var(--bat-armor); }
.bat-ult { color: var(--bat-ult); font-weight: 700; }
.bat-shield { color: var(--bat-shield); }
.bat-stun { color: var(--bat-stun); }
.bat-fenhun { color: var(--bat-fenhun); }
.bat-strip { color: var(--bat-strip); }
.bat-cleanse { color: var(--bat-cleanse); }

/* —— 宠物 / 坐骑 / 称号 —— */
.pet-white { color: var(--q-white); }
.pet-purple { color: var(--q-purple); font-weight: 700; }
.pet-orange { color: var(--q-orange); font-weight: 700; }
.pet-blue { color: var(--q-blue); font-weight: 700; }
.pet-egg-white { color: var(--mat-white); }
.pet-egg-purple { color: var(--mat-purple); font-weight: 700; }
.pet-egg-orange { color: var(--mat-orange); font-weight: 700; }
.star-low { color: #6a7480; }
.star-mid { color: var(--enh6); }
.star-high { color: var(--enh9); }
.star-max { color: var(--enh10); font-weight: 700; }
.apt-poor { color: var(--dim); }
.apt-good { color: var(--ok); }
.apt-top { color: var(--q-orange); font-weight: 700; }
.pskill-buff { color: var(--ok); }
.pskill-ctrl { color: var(--q-purple); }
.pskill-out { color: var(--ink); }
.pskill-fire { color: var(--bat-fire); }
.pskill-ice { color: #0066aa; }
.pskill-thunder { color: var(--enh9); }
.pskill-rare { color: var(--q-gold); font-weight: 700; }
.mount-turtle { color: #4a7a9a; font-size: 0.95em; }
.mount-normal { color: var(--khaki); }
.mount-thunder { color: var(--enh9); font-weight: 700; }
.mount-dragon { color: var(--q-gold); font-weight: 700; }
.title-normal { color: var(--ink); }
.title-dungeon { color: var(--enh6); font-weight: 700; }
.title-gold { color: var(--q-gold); font-weight: 700; }
.title-top { font-weight: 700; }

/* —— buff / 公告 —— */
.buff-ls { color: var(--ok); }
.buff-crit { color: var(--q-orange); }
.buff-resist { color: var(--enh8); }
.buff-shield { color: var(--khaki); }
.buff-morale { color: #8a7a40; font-size: 0.95em; }
.buff-drop, .buff-gold, .buff-exp { color: var(--ok); }
.debuff-gray { color: var(--dim); }
.debuff-purple { color: var(--q-purple); }
.debuff-red { color: var(--sys); }
.set-active { color: var(--q-gold); }
.recharge-5k, .recharge-30k {
  color: var(--recharge-gold);
  display: block;
  margin: 4px 0;
  line-height: 1.5;
}
.scene-atmo {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
  opacity: 0.9;
}
.notice-red { color: var(--sys); font-weight: 700; }
.notice-drop { color: var(--q-gold); font-weight: 700; }
.notice-chat { color: var(--ink); }
.notice-fly { font-weight: 700; }

/* UBB COLOR */
.ubb-c-white, .ubb-c-lightwhite { color: var(--enh1); }
.ubb-c-red { color: var(--enh4); }
.ubb-c-orange { color: var(--enh5); }
.ubb-c-yellow { color: #c9a017; }
.ubb-c-green { color: var(--enh7); }
.ubb-c-cyan { color: var(--enh8); }
.ubb-c-blue { color: var(--enh9); }
.ubb-c-purple { color: var(--enh10); }
.ubb-c-gold { color: var(--q-gold); }
.ubb-c-khaki { color: var(--khaki); }
.ubb-c-gray, .ubb-c-grey { color: var(--dim); }
.ubb-c-pink { color: var(--bat-stun); }

/* 海誓山盟 7 件：情侣粉色爱心文字特效 */
.couple-heart-set .couple-heart-text,
.couple-heart-text {
  color: #d46a9a;
  font-weight: 700;
}
.couple-heart-fx {
  color: #e078a8;
  letter-spacing: 0.08em;
  animation: cm-heart-pulse 1.6s ease-in-out infinite;
  display: inline-block;
}
@keyframes cm-heart-pulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* GLOW / FLY（轻量，非霓虹） */
.glow, .glow-purple, .glow-gold, .glow-yellow, .glow-orange {
  text-shadow: 0 0 3px currentColor, 0 0 6px rgba(122, 26, 170, 0.22);
}
.glow-gold { text-shadow: 0 0 3px #c9a227, 0 0 7px rgba(154, 110, 20, 0.35); }
.glow-yellow { text-shadow: 0 0 3px #d4b84a, 0 0 7px rgba(176, 138, 24, 0.4); }
.glow-orange { text-shadow: 0 0 3px #d4782a, 0 0 7px rgba(196, 96, 24, 0.4); }
.glow-purple { text-shadow: 0 0 3px #9a4, 0 0 8px rgba(122, 26, 170, 0.4); }

/* 霸者 6 件：金色星月粒子 / 脚下星月符文 */
.star-moon-set .star-moon-text,
.star-moon-text {
  color: #c9a227;
  font-weight: 700;
}
.star-moon-fx {
  color: #d4b84a;
  letter-spacing: 0.06em;
  animation: cm-starmoon 2s ease-in-out infinite;
  display: inline-block;
  text-shadow: 0 0 4px rgba(201, 162, 39, 0.45);
}
@keyframes cm-starmoon {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes cm-fly {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}
@keyframes cm-rainbow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
.fly {
  display: inline-block;
  animation: cm-fly 1.8s ease-in-out infinite;
}
.fly-rainbow {
  display: inline-block;
  background: linear-gradient(90deg, #c01818, #d46a12, #b08a18, #1a7a32, #0a8a8a, #0a3d9c, #7a1aaa, #c01818);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: cm-fly 1.5s ease-in-out infinite, cm-rainbow 5s linear infinite;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .fly, .fly-rainbow { animation: none; }
}

.equip-panel .eq-row { margin: 6px 0; line-height: 1.55; }
.equip-panel .eq-lab { color: var(--muted); font-size: 0.88rem; }
.equip-panel .eq-items { color: inherit; }
.set-panel { margin: 6px 0 10px; }
.item-detail { line-height: 1.65; }
.item-detail .detail-name {
  font-family: var(--font-brand);
  font-size: 1.12rem;
  margin: 6px 0 10px;
}

/* 战斗页同一语言 */
.battle-stage {
  margin: 4px 0 8px;
}
.battle-stage .battle-meta {
  margin: 2px 0 4px;
}
.battle-log {
  margin: 10px 0 12px;
  padding: 8px 0;
  border-top: 1px dotted var(--line);
  border-bottom: 1px dotted var(--line);
  font-size: 0.92rem;
  line-height: 1.65;
  max-height: 42vh;
  overflow-y: auto;
}
.battle-log .bat-normal,
.battle-log .bat-fire,
.battle-log .bat-heal,
.battle-log .bat-para,
.battle-log .bat-armor,
.battle-log .bat-ult,
.battle-log .bat-shield,
.battle-log .bat-stun,
.log .bat-normal, .log .bat-fire, .log .bat-heal, .log .bat-para,
.log .bat-armor, .log .bat-ult {
  display: block;
  margin: 2px 0;
}
.battle-actions {
  margin-top: 8px;
  padding-top: 4px;
  line-height: 2.1;
}
.battle-actions .lnk, .battle-actions a {
  margin-right: 16px;
  padding: 6px 0;
  font-size: 1rem;
}

.hpbar {
  height: 8px;
  background: #e8eef4;
  border: 1px solid #a8b8c8;
  border-radius: 0;
  overflow: hidden;
  margin: 4px 0 10px;
}
.hpbar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5a9a5a, #6eb06e);
}
.hpbar.enemy > i {
  background: linear-gradient(90deg, #c06060, #d07878);
}

.footer {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.hidden { display: none !important; }

#startScreen {
  margin-top: 36px;
  text-align: center;
  padding: 0 4px;
}
#startScreen .brand-big {
  font-family: var(--font-brand);
  font-size: 1.85rem;
  color: var(--ink);
  letter-spacing: 0.28em;
  margin: 12px 0 8px;
  font-weight: 700;
  line-height: 1.35;
}
#startScreen .tagline {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
  letter-spacing: 0.06em;
  line-height: 1.5;
}
#startScreen .btns {
  text-align: center;
  line-height: 2.2;
}
#startScreen .btns .lnk,
#startScreen .btns a,
#startScreen .btns button {
  display: inline-block;
  margin: 0 12px;
  padding: 8px 4px;
  font-size: 1.05rem;
  min-height: 40px;
}

input[type="text"] {
  width: 100%;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid #9ab0c0;
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  font-size: 0.95rem;
  font-family: inherit;
  margin: 10px 0 16px;
}
input[type="text"]:focus {
  outline: 1px solid var(--link);
  outline-offset: 1px;
}

select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #9ab0c0;
  max-width: 160px;
  padding: 4px 6px;
}

.talk-panel {
  margin-top: 4px;
}
.talk-panel .talk-who {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.talk-panel .talk-line {
  font-size: 1rem;
  line-height: 1.7;
  min-height: 3.4em;
  color: var(--ink);
  padding: 4px 0 8px;
}
.talk-panel .talk-line.you { color: var(--link); }
.talk-progress {
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 4px;
}

.back-line {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dotted var(--line-soft);
}

.pet-portrait {
  width: 96px;
  height: 96px;
  margin: 8px 0;
  border: 1px solid #9ab0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(165deg, #eef4f8 0%, #d8e4ee 50%, #b8cce0 100%);
}

/* —— 原生 WAP 信息行 / 图标位 —— */
.wap-title {
  text-align: center;
  font-weight: 700;
  margin: 4px 0 10px;
  letter-spacing: 0.12em;
}
.wap-kv {
  margin: 0;
  padding: 1px 0;
  line-height: 1.55;
  word-break: break-word;
}
.wap-sheet .wap-kv { padding: 2px 0; }
.wap-ico {
  display: inline-block;
  width: 1.35em;
  height: 1.35em;
  line-height: 1.35em;
  text-align: center;
  font-size: 0.72rem;
  margin-right: 4px;
  vertical-align: middle;
  border: 1px solid #aaa;
  background: #eee;
  color: #333;
}
.wap-ico.q-green { background: #d8f0d8; border-color: #1a7a32; color: #1a7a32; }
.wap-ico.q-blue { background: #d8e4f8; border-color: #0a3d9c; color: #0a3d9c; }
.wap-ico.q-purple { background: #ead8f8; border-color: #7a1aaa; color: #7a1aaa; }
.wap-ico.q-orange { background: #f8e4d0; border-color: #d46a12; color: #d46a12; }
.wap-ico.q-gold { background: #f5ecd0; border-color: #9a6e14; color: #9a6e14; }
.wap-icon-lg {
  width: 112px;
  height: 112px;
  margin: 6px 0 10px;
  border: 1px solid #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  background: #f4f4f4;
}
.wap-icon-lg.q-green { background: #e8f5e8; }
.wap-icon-lg.q-blue { background: #e8eef8; }
.wap-icon-lg.q-purple { background: #f0e8f8; }
.wap-icon-lg.q-orange { background: #f8eee4; }
.wap-icon-lg.q-gold { background: #f8f0d8; }
.wap-icon-lg.pet-ico { font-size: 52px; }
.foot-sep {
  margin: 10px 0 6px;
  color: var(--dim);
  letter-spacing: 0;
  font-size: 0.85rem;
}
.wap-battle .battle-log {
  margin: 8px 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.see-npc .head-mark-line,
.see-self .head-mark-line {
  margin: 0;
  min-height: 0;
  line-height: 1.1;
}
.see-npc .head-mark,
.see-self .head-mark,
.quest-main-banner .head-mark {
  font-size: 1.15em;
}
.see-list li.see-npc,
.see-list li.see-self {
  padding: 3px 0;
}
.pet-switch { margin: 4px 0 8px; line-height: 1.7; }
.pet-skills { margin: 4px 0 8px; line-height: 1.65; }
.equip-panel .eq-row { margin: 4px 0; line-height: 1.7; }
.equip-panel .eq-lab { font-weight: 700; }
.btns.stack .lnk, .btns.stack a, .btns.stack .off {
  display: block;
  margin: 4px 0;
}

/* 桌面略宽仍居中；手机触控更松 */
@media (min-width: 480px) {
  html, body { font-size: 16px; }
  #app { padding: 14px 18px 40px; }
}
@media (max-width: 360px) {
  #app { padding: 8px 10px 28px; }
  .brand { letter-spacing: 0.14em; font-size: 1.2rem; }
  .big-links .lnk, .big-links a { letter-spacing: 0.16em; font-size: 1rem; }
  .dir-grid { gap: 6px 10px; }
}
