/* ==========================================================================
   FX戦士くるみちゃん 模拟器 — 基础层
   配色取自原作动画官网 info 站的实际变量：
     --color-pink:      #FF78A6
     --color-lightblue: #17BCC8
     --color-yellow:    #FFF7C7
   视觉语言：高饱和撞色 / 粗描边 / 硬投影 / 圆角胶囊 / 漫画集中线
   ========================================================================== */

:root {
  /* —— 原作三色（官网同名变量原值）—— */
  --pink: #ff78a6;
  --cyan: #17bcc8;
  --cream: #fff7c7;

  /* —— 由三色展开的辅助色 —— */
  --pink-deep: #e34d80;
  --pink-soft: #ffd7e5;
  --pink-mist: #fff0f6;
  --cyan-deep: #0e8d97;
  --cyan-soft: #abe7e7;
  --cyan-mist: #eafafa;
  --sky: #6ccfee;
  --yellow-pop: #ffe14d;
  --yellow-deep: #f0c000;
  --plum: #4a2c3f;
  --plum-soft: #7a5568;
  --ink: #2b1b26;
  --paper: #fffdf8;
  --paper-warm: #fff9ee;

  /* —— 功能色：涨=青绿 / 跌=红粉（原著 K 线同款撞色）—— */
  --up: #17bcc8;
  --up-deep: #0e8d97;
  --down: #ef4a72;
  --down-deep: #c62b52;

  /* —— 描边与硬投影（漫画感的关键）—— */
  --line: 3px;
  --line-thin: 2px;
  --shadow: 5px 5px 0 var(--plum);
  --shadow-sm: 3px 3px 0 var(--plum);
  --shadow-lg: 8px 8px 0 var(--plum);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  /* 优先使用完整覆盖简体中文和日文的本地字体，避免同一个词逐字回退到不同字形。 */
  --font-body: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Yu Gothic UI",
    "Yu Gothic", Meiryo, sans-serif;
  --font-display: var(--font-body);
  --font-num: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
/* Let nested layout items shrink; horizontal scrolling belongs to its list container. */
main, .view { min-width: 0; max-width: 100%; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  background-color: var(--cream);
  /* 奶油底 + 细微圆点，模仿漫画网点 */
  background-image:
    radial-gradient(var(--pink-soft) 1.5px, transparent 1.6px),
    radial-gradient(var(--cyan-soft) 1.5px, transparent 1.6px);
  background-size: 26px 26px, 26px 26px;
  background-position: 0 0, 13px 13px;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .02em;
}

p { margin: 0 0 10px; }
a { color: var(--cyan-deep); }

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }

.hidden { display: none !important; }

/* 只在无障碍场景出现的文本 */
.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;
}

/* ============================ 通用控件 ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 20px;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 15px;
  white-space: nowrap;
  transition: transform .1s, box-shadow .1s, background .15s;
}
.btn:hover:not(:disabled) { background: var(--cream); }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--plum); }
.btn:disabled { opacity: .45; box-shadow: 2px 2px 0 var(--plum-soft); }

.btn--primary { background: var(--pink); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--pink-deep); }
.btn--cyan { background: var(--cyan); color: #fff; }
.btn--cyan:hover:not(:disabled) { background: var(--cyan-deep); }
.btn--ghost { background: #fff; }
.btn--sm { min-height: 36px; padding: 5px 14px; font-size: 13px; box-shadow: 2px 2px 0 var(--plum); }
.btn--block { width: 100%; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.pill--pink { background: var(--pink); color: #fff; }
.pill--cyan { background: var(--cyan); color: #fff; }
.pill--cream { background: var(--cream); }
.pill--warn { background: var(--yellow-pop); }

/* 漫画对话气泡 */
.bubble {
  position: relative;
  padding: 11px 16px;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.bubble::after {
  content: "";
  position: absolute;
  left: 26px; bottom: -13px;
  width: 0; height: 0;
  border: 8px solid transparent;
  border-top-color: var(--ink);
  border-bottom: 0;
}
.bubble::before {
  content: "";
  position: absolute;
  left: 29px; bottom: -8px;
  z-index: 1;
  width: 0; height: 0;
  border: 6px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}

/* ============================ 面板 ============================ */

.panel {
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

/* 标题条：粉底白字胶囊，模仿原作 UI */
.sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 17px;
}
.sec-title::before {
  content: "";
  width: 12px; height: 12px;
  border: var(--line-thin) solid var(--ink);
  border-radius: 50%;
  background: var(--pink);
}
