/* ============================================================
   qqhsuan.com — Kingshot 攻略資訊站
   風格對齊 kingshot.com 官網：羊皮紙暖色底、圓潤卡片、
   厚實立體按鈕、深藍導覽列 + 金黃 active。
   ============================================================ */

:root {
  /* 紙面 */
  --paper:    #fff8f3;
  --paper-2:  #fdf3ea;
  --panel:    #ede2d7;
  --panel-2:  #f7eee4;
  --panel-3:  #fffbf6;

  /* 邊框 / 分隔 */
  --tan:      #d8c0a5;
  --tan-d:    #bfa485;
  --line:     #e3d5c4;

  /* 文字 */
  --ink:      #553b37;
  --ink-2:    #7a625c;
  --muted:    #938885;

  /* 強調色 */
  --teal:     #41b4b9;
  --teal-d:   #2c8f94;
  --gold:     #ffde46;
  --orange:   #f5a623;
  --orange-l: #ffcc5e;
  --orange-d: #c97a16;
  --brown:    #c2691a;
  --danger:   #c0453a;
  --success:  #3e9455;

  /* 導覽 / 主視覺 */
  --navy:     #2a3a55;
  --navy-2:   #1b2740;
  --sky:      #8fd3f0;
  --sky-2:    #bfe8f7;
  --grass:    #8cc96e;

  --nav-h:    58px;
  --maxw:     1100px;

  --font: "PingFang TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shadow-card: 0 4px 0 rgba(191,164,133,.55), 0 10px 24px rgba(85,59,55,.10);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #4a3308; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brown); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--gold); color: #4a3308; font-weight: 800;
  padding: 10px 16px; border-radius: 0 0 12px 12px;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; text-decoration: none; }

/* ============================================================
   Header / Nav — 深藍條 + 金黃 active
   ============================================================ */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  box-shadow: 0 2px 0 rgba(0,0,0,.18), 0 6px 18px rgba(27,39,64,.22);
}

.nav {
  max-width: var(--maxw); margin: 0 auto; padding: 0 18px;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: grid; place-items: center; font-size: 17px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--orange-l), var(--orange));
  border-bottom: 3px solid var(--orange-d);
  box-shadow: 0 3px 8px rgba(0,0,0,.28);
}
.brand-name {
  font-size: 19px; font-weight: 900; letter-spacing: .06em;
  color: var(--gold);
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.brand-sub {
  display: block; margin-top: -4px;
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  color: rgba(255,255,255,.72);
}

.nav-toggle {
  display: none;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px; width: 42px; height: 38px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: #fff;
  border-radius: 2px; transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  position: relative; display: block; padding: 8px 15px;
  font-size: 15.5px; font-weight: 700; color: #fff;
  transition: color .15s ease;
}
.nav-menu a::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 2px;
  height: 3px; border-radius: 3px; background: var(--gold);
  transform: scaleX(0); transform-origin: center; transition: transform .18s ease;
}
.nav-menu a:hover { color: var(--gold); text-decoration: none; }
.nav-menu a.is-active { color: var(--gold); }
.nav-menu a.is-active::after { transform: scaleX(1); }
.nav-menu .is-soon {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px;
  font-size: 15.5px; font-weight: 700; color: rgba(255,255,255,.42);
  cursor: default;
}
.nav-menu .is-soon::after {
  content: "SOON"; font-size: 9px; font-weight: 800; letter-spacing: .1em;
  padding: 2px 5px; border-radius: 5px;
  background: rgba(255,255,255,.13); color: rgba(255,255,255,.6);
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--navy-2);
    border-top: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 18px 34px rgba(27,39,64,.4);
    padding: 10px 14px 18px;
    max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .2s ease, opacity .2s ease, visibility .2s;
  }
  .nav-menu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-menu a, .nav-menu .is-soon { padding: 13px 14px; font-size: 16.5px; }
  .nav-menu a::after { left: 14px; right: auto; width: 22px; bottom: 6px; }
}

/* ============================================================
   Hero — 天空藍 → 草地綠，白字厚描邊
   ============================================================ */

.hero {
  position: relative;
  padding: clamp(48px, 9vw, 84px) 0 clamp(78px, 10vw, 112px);
  background:
    radial-gradient(680px 300px at 78% 12%, rgba(255,255,255,.75), transparent 62%),
    radial-gradient(520px 240px at 14% 26%, rgba(255,255,255,.6), transparent 60%),
    linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 46%, #d9eec4 72%, var(--grass) 100%);
  overflow: hidden;
}
/* 地面草坡 */
.hero::after {
  content: ""; position: absolute; left: -5%; right: -5%; bottom: -46px; height: 120px;
  background: #79bd5e;
  border-radius: 50% 50% 0 0 / 46px 46px 0 0;
  box-shadow: 0 -4px 0 rgba(255,255,255,.28) inset;
}
.hero > .wrap { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .1em;
  color: #4a3308; background: linear-gradient(180deg, #ffe97a, var(--gold));
  border-bottom: 3px solid #d9ab14;
  padding: 6px 15px; border-radius: 999px; margin-bottom: 20px;
  box-shadow: 0 3px 10px rgba(0,0,0,.16);
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(31px, 6.6vw, 56px); line-height: 1.22;
  font-weight: 900; letter-spacing: .02em; color: #fff;
  text-shadow:
    -2px -2px 0 #3f6a8d, 2px -2px 0 #3f6a8d, -2px 2px 0 #3f6a8d, 2px 2px 0 #3f6a8d,
    0 5px 0 rgba(45,79,106,.55), 0 10px 22px rgba(30,55,80,.35);
}
.hero p {
  margin: 0 0 30px; max-width: 58ch;
  font-size: clamp(15px, 2.3vw, 17.5px); font-weight: 600; color: #2f4c3a;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }

/* ============================================================
   Buttons — 厚實立體
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 14px; border: 0;
  font-family: var(--font);
  font-size: 15.5px; font-weight: 800; cursor: pointer;
  transition: filter .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: translateY(3px); }

.btn--primary {
  background: linear-gradient(180deg, var(--orange-l), var(--orange));
  color: #5a3b10;
  border-bottom: 4px solid var(--orange-d);
  box-shadow: 0 6px 16px rgba(201,122,22,.32);
}
.btn--primary:active { border-bottom-width: 1px; margin-bottom: 3px; }

.btn--teal {
  background: linear-gradient(180deg, #63c9cd, var(--teal));
  color: #fff;
  border-bottom: 4px solid var(--teal-d);
  box-shadow: 0 6px 16px rgba(44,143,148,.28);
}
.btn--teal:active { border-bottom-width: 1px; margin-bottom: 3px; }

.btn--ghost {
  background: var(--panel-3); color: var(--ink);
  border: 2px solid var(--tan); border-bottom-width: 4px;
}
.btn--ghost:hover { background: #fff; }
.btn--ghost:active { border-bottom-width: 2px; margin-bottom: 2px; }

.btn--block { width: 100%; }

/* ============================================================
   Sections
   ============================================================ */

.section { padding: 60px 0; }
.section--tight { padding: 42px 0; }
.section--alt { background: var(--paper-2); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }

.section-head { margin-bottom: 28px; }
.kicker {
  display: inline-block; margin: 0 0 10px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: #fff;
  background: var(--tan); padding: 4px 11px; border-radius: 7px;
}
.h2 {
  margin: 0 0 12px; font-size: clamp(23px, 4.2vw, 31px);
  line-height: 1.35;
  font-weight: 900; letter-spacing: .01em; color: var(--ink);
}
.h2::after {
  content: ""; display: block; width: 54px; height: 5px; border-radius: 5px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  margin-top: 12px;
}
.lede { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 62ch; }

/* ============================================================
   Cards
   ============================================================ */

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--panel);
  border: 2px solid var(--tan-d);
  border-radius: 18px; padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
}
.card h3 { margin: 0 0 8px; font-size: 18.5px; font-weight: 800; color: var(--ink); }
.card p  { margin: 0 0 18px; font-size: 14.5px; color: var(--ink-2); flex: 1; }
.card-icon {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 15px;
  display: grid; place-items: center; font-size: 23px;
  background: var(--panel-3);
  border: 2px solid var(--tan); border-bottom-width: 4px;
}

.card--link { transition: transform .18s ease, box-shadow .18s ease; }
a.card--link:hover {
  text-decoration: none; transform: translateY(-4px);
  box-shadow: 0 8px 0 rgba(191,164,133,.55), 0 16px 30px rgba(85,59,55,.16);
}

.card--soon { opacity: .72; }
.tag-soon {
  align-self: flex-start; font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  padding: 5px 10px; border-radius: 7px;
  background: var(--tan); color: #fffefe;
}

/* ---------- 條列 ---------- */
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; font-size: 15px; color: var(--ink-2); }
.ticks li::before {
  content: "◆"; position: absolute; left: 0; top: 2px;
  color: var(--orange); font-size: 11px;
}
.ticks strong { color: var(--brown); }

/* ---------- 提醒框 ---------- */
.notice {
  display: flex; gap: 13px; align-items: flex-start;
  background: #fdeae5;
  border: 2px solid #e8a99c; border-bottom-width: 4px;
  border-radius: 16px; padding: 16px 18px;
}
.notice-icon { font-size: 21px; line-height: 1.3; }
.notice h4 { margin: 0 0 4px; font-size: 15.5px; font-weight: 800; color: #b4453a; }
.notice p  { margin: 0; font-size: 13.5px; color: #8a5148; }

/* ---------- 麵包屑 ---------- */
.crumb { font-size: 13.5px; color: var(--muted); padding: 16px 0 4px; }
.crumb a { color: var(--ink-2); font-weight: 600; }
.crumb span { margin: 0 7px; opacity: .6; }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: rgba(255,255,255,.78);
  padding: 44px 0 32px;
}
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1fr; margin-bottom: 28px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }

.footer-about p { margin: 12px 0 0; font-size: 13.5px; color: rgba(255,255,255,.62); max-width: 44ch; }
.footer-col h4 {
  margin: 0 0 12px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { font-size: 14.5px; color: rgba(255,255,255,.78); }
.footer-col a:hover { color: var(--gold); }
.footer-col .soon { font-size: 14.5px; color: rgba(255,255,255,.36); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  justify-content: space-between; align-items: center;
  font-size: 12.5px; color: rgba(255,255,255,.48);
}
.footer-bottom p { margin: 0; }

/* ============================================================
   聖劍計算機模組 — 由深色主題改套官網羊皮紙風
   （只覆寫外觀，不動任何 HTML 結構與 JS 行為）
   ============================================================ */

body #slc-app {
  --slc-bg: transparent;
  --slc-card: var(--panel);
  --slc-border: var(--tan-d);
  --slc-line: var(--line);
  --slc-text: var(--ink);
  --slc-muted: var(--ink-2);
  --slc-faint: var(--muted);
  --slc-amber: var(--orange);
  --slc-gold: var(--brown);
  --slc-red: var(--danger);
  --slc-green: var(--success);

  background: none !important;
  color: var(--ink);
  font-family: var(--font);
  padding: 8px 16px 40px !important;
}
body #slc-app .slc-shell { max-width: var(--maxw) !important; }
body #slc-app ::selection { background: var(--gold); color: #4a3308; }

/* 標題 */
body #slc-app .slc-title {
  background: none; -webkit-text-fill-color: initial;
  color: var(--ink); font-weight: 900; font-size: 30px; line-height: 1.3;
}
body #slc-app .slc-subtitle { color: var(--ink-2); }
body #slc-app .slc-header { border-bottom: 2px solid var(--line); }
body #slc-app .slc-langbox label { color: var(--ink-2); font-weight: 600; }

/* 表單 */
body #slc-app select.slc-select,
body #slc-app input.slc-input {
  background: var(--panel-3); color: var(--ink);
  border: 2px solid var(--tan); border-radius: 12px;
  font-family: var(--font);
}
body #slc-app input.slc-input { font-family: var(--mono); font-weight: 700; }
body #slc-app select.slc-select:focus,
body #slc-app input.slc-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245,166,35,.25);
}
body #slc-app .slc-unit { color: var(--muted); }
body #slc-app .slc-field label, #slc-app .slc-calcgrid label { color: var(--ink-2); font-weight: 600; }

/* 主按鈕 */
body #slc-app button.slc-btn-primary {
  background: linear-gradient(180deg, var(--orange-l), var(--orange));
  color: #5a3b10; font-family: var(--font);
  border-bottom: 4px solid var(--orange-d);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(201,122,22,.32);
}
body #slc-app button.slc-btn-primary:active { transform: translateY(3px); border-bottom-width: 1px; margin-bottom: 3px; }

/* 警告條 */
body #slc-app .slc-warning {
  background: #fdeae5;
  border: 2px solid #e8a99c; border-bottom-width: 4px; border-radius: 16px;
}
body #slc-app .slc-warning h4 { color: #b4453a; font-weight: 800; }
body #slc-app .slc-warning p  { color: #8a5148; }

/* 卡片 */
body #slc-app .slc-card {
  background: var(--panel);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 2px solid var(--tan-d);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
body #slc-app .slc-h2 { color: var(--ink); font-weight: 800; }
body #slc-app .slc-kicker {
  display: inline-block; color: #fff; background: var(--tan);
  padding: 4px 11px; border-radius: 7px;
}
body #slc-app .slc-divider { border-top: 2px solid var(--line); }

/* 角色標頭 */
body #slc-app .slc-rolehead { border-radius: 18px 18px 0 0; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
body #slc-app .slc-rolehead--dps     { background: linear-gradient(180deg, #f2765a, #e0492f); color: #fff; }
body #slc-app .slc-rolehead--tank    { background: linear-gradient(180deg, var(--orange-l), var(--orange)); color: #5a3b10; text-shadow: 0 2px 0 rgba(255,255,255,.35); }
body #slc-app .slc-rolehead--support { background: linear-gradient(180deg, #5cc6cb, var(--teal)); color: #fff; }
body #slc-app .slc-rolebody { border-top: 0; }

/* 戰術條列 */
body #slc-app .slc-tactics { color: var(--ink-2); }
body #slc-app .slc-tactics li::before { color: var(--orange); }
body #slc-app .slc-tactics strong { color: var(--brown); }

/* 結果框 */
body #slc-app .slc-resultbox,
body #slc-app .slc-timerbox {
  background: var(--panel-3);
  border: 2px solid var(--tan); border-radius: 14px;
}
body #slc-app .slc-resultline .slc-k { color: var(--ink-2); }
body #slc-app .slc-resultline .slc-v { color: var(--brown); }
body #slc-app .slc-resultline .slc-v--red { color: var(--danger); }
body #slc-app .slc-note { color: var(--muted); font-family: var(--font); }

/* 計時器 */
body #slc-app .slc-tool-title { color: var(--ink); font-weight: 800; }
body #slc-app .slc-tool-desc  { color: var(--ink-2); }
body #slc-app .slc-timer-display { color: var(--danger); }
body #slc-app .slc-timer-display.slc-done { color: var(--success); }
body #slc-app .slc-timer-status { color: var(--brown); }
body #slc-app button.slc-btn-sm { font-family: var(--font); border-radius: 11px; }
body #slc-app button.slc-btn-sm--amber {
  background: linear-gradient(180deg, var(--orange-l), var(--orange));
  color: #5a3b10; border-bottom: 3px solid var(--orange-d);
}
body #slc-app button.slc-btn-sm--gray {
  background: var(--panel-3); color: var(--ink-2);
  border: 2px solid var(--tan); border-bottom-width: 3px;
}
body #slc-app button.slc-btn-sm--gray:hover { background: #fff; }

/* 模組頁尾（站台已有頁尾，隱藏重複的一行） */
body #slc-app .slc-footer { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
