/*
 * web.playqiyu.com 官方網站的共用樣式：顏色、字型、按鈕、頁首頁尾、文件頁（隱私、條款、支援）與 404。
 * 首頁另外載入 home.css。顏色取自遊戲 logo：木頭的深咖啡底、蜂蜜黃的字、橘色的陰影、葉子的綠。
 * 沒有 JavaScript、沒有行內樣式（CSP）。
 */
:root {
  --bark: #24150c;
  --bark-2: #2e1b0f;
  --bark-3: #3b2415;
  --bark-4: #54351f;
  --edge: #140b05;
  --outline: #5a2f10;
  --line: rgba(255, 222, 160, 0.13);
  --cream: #fff3da;
  --mist: #d2bd9c;
  --honey: #ffc93c;
  --honey-l: #ffe27a;
  --amber: #f08a1c;
  --leaf: #82d150;
  --leaf-d: #3f8a26;
  --link: #ffd56b;
  --r-common: #8f8a80;
  --r-rare: #4d97ff;
  --r-epic: #b06cff;
  --r-unique: #ffb020;
  --r-myth: #f2564f;
  --font: 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans', 'Segoe UI', sans-serif;
  --display: 'Huninn', 'Fredoka', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  --num: 'Fredoka', 'Noto Sans TC', sans-serif;
  --gutter: 16px;
  --wrap: 1200px;
  --measure: 68ch;
}
html[lang^='en'] {
  --font: 'Noto Sans TC', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Fredoka', 'Segoe UI', sans-serif;
  --measure: 72ch;
}

* {
  box-sizing: border-box;
}
html {
  background: var(--bark);
  color: var(--cream);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bark);
  overflow-x: hidden;
}
img,
video {
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
}
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--honey-l);
}
:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
}
html[lang^='en'] h1,
html[lang^='en'] h2,
html[lang^='en'] h3 {
  font-weight: 600;
  letter-spacing: 0;
}
h2 {
  color: var(--honey);
  font-size: 1.6rem;
  text-shadow: 0 3px 0 var(--outline);
}
h3 {
  font-size: 1.2rem;
}
p {
  margin: 0 0 1em;
}
ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}
li {
  margin: 0.3em 0;
}
strong,
b {
  font-weight: 700;
}
code {
  font-family: Consolas, 'SFMono-Regular', Menlo, monospace;
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bark-3);
  border: 1px solid var(--edge);
}
.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  padding: 6px 12px;
  background: var(--honey);
  color: #4a2408;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus {
  top: 8px;
}

/* ---------- 版面 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- 文件頁的頁首 ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.top .brand img {
  display: block;
  height: 56px;
  width: auto;
}
.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.top nav a {
  color: var(--cream);
  text-decoration: none;
  padding: 4px 0;
}
.top nav a:hover,
.top nav a[aria-current] {
  color: var(--honey);
}
.lang {
  font-family: var(--num);
  font-weight: 600;
  padding: 2px 12px !important;
  border: 1px solid var(--bark-4);
  border-radius: 999px;
}
.top nav .lang {
  color: var(--mist);
}
.top nav .lang:hover {
  color: var(--cream);
  border-color: var(--mist);
}

/* ---------- 按鈕 ---------- */
.btn {
  --c1: #6a4a33;
  --c2: #4d321e;
  --cd: var(--edge);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px 9px;
  border: 2px solid var(--edge);
  border-radius: 12px;
  background: linear-gradient(var(--c1), var(--c2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18), 0 3px 0 var(--cd);
  color: var(--cream);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  transition: transform 0.06s, filter 0.12s;
}
.btn:hover {
  color: var(--cream);
  filter: brightness(1.1);
}
.btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18), 0 1px 0 var(--cd);
}
.btn.green {
  --c1: #93e264;
  --c2: #57b73a;
  --cd: var(--leaf-d);
}
/* 主要按鈕：logo 字的那種蜂蜜糖果感（亮黃到橘，深咖啡描邊） */
.btn.honey {
  border: 3px solid var(--outline);
  border-radius: 16px;
  background: linear-gradient(#ffe68a, var(--honey) 46%, #f59e22);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), inset 0 -4px 0 rgba(176, 82, 0, 0.32), 0 5px 0 var(--outline),
    0 14px 26px rgba(0, 0, 0, 0.4);
  color: #4a2408;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
html[lang^='en'] .btn.honey {
  font-weight: 700;
  letter-spacing: 0.01em;
}
.btn.honey:hover {
  color: #4a2408;
  filter: brightness(1.06) saturate(1.1);
}
.btn.honey:active {
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), inset 0 -4px 0 rgba(176, 82, 0, 0.32), 0 2px 0 var(--outline),
    0 8px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(3px);
}
.btn.big {
  padding: 14px 44px 15px;
  font-size: 1.5rem;
  border-radius: 20px;
}
.btn.small {
  padding: 5px 16px 6px;
  font-size: 0.95rem;
  border-width: 2px;
  border-radius: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* ---------- 頁尾 ---------- */
footer.foot {
  padding: 32px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: 0.9rem;
}
footer.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-bottom: 14px;
}
footer.foot nav a {
  color: var(--cream);
  text-decoration: none;
}
footer.foot nav a:hover {
  color: var(--honey);
}
footer.foot p {
  margin: 0 0 4px;
}
.wrap > footer.foot {
  margin-top: 24px;
}

/* ---------- 文件頁（隱私、條款、支援） ---------- */
.doc {
  margin: 32px auto 24px;
  padding: clamp(24px, 4vw, 48px);
  max-width: calc(var(--measure) + 96px);
  background: var(--bark-2);
  border: 2px solid var(--edge);
  border-radius: 22px;
  box-shadow: inset 0 2px 0 rgba(255, 230, 180, 0.05), 0 18px 40px rgba(0, 0, 0, 0.35);
}
.doc > * {
  max-width: var(--measure);
}
.doc h1 {
  font-size: 2.2rem;
  color: var(--honey);
  text-shadow: 0 3px 0 var(--outline);
}
.doc .meta {
  margin: 12px 0 24px;
  color: var(--mist);
  font-size: 0.92rem;
}
.doc h2 {
  margin: 44px 0 12px;
  font-size: 1.45rem;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.doc h3 {
  margin: 24px 0 8px;
  color: var(--cream);
}
.doc .toc {
  padding: 16px 20px 16px 38px;
  margin: 0 0 8px;
  border: 1px solid var(--bark-4);
  border-radius: 14px;
  background: var(--bark);
  columns: 2;
  column-gap: 32px;
  font-size: 0.95rem;
}
.doc .toc li {
  break-inside: avoid;
  margin: 2px 0;
}
.doc .toc a {
  color: var(--cream);
  text-decoration: none;
}
.doc .toc a:hover {
  color: var(--honey);
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 18px;
  font-size: 0.95rem;
}
.doc th,
.doc td {
  padding: 8px 10px;
  border: 1px solid var(--bark-4);
  vertical-align: top;
  text-align: left;
}
.doc th {
  background: var(--bark-3);
  font-weight: 700;
  white-space: nowrap;
}
.doc .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.doc .contact {
  margin: 32px 0 0;
  padding: 18px 22px;
  background: var(--bark-3);
  border: 2px solid var(--edge);
  border-left: 6px solid var(--honey);
  border-radius: 14px;
}
.doc .contact h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 1.2rem;
}
.doc .contact p:last-child {
  margin: 0;
}
.doc .note {
  padding: 12px 16px;
  border-left: 4px solid var(--honey);
  background: var(--bark);
  border-radius: 0 10px 10px 0;
  color: var(--mist);
}
.doc .note b {
  color: var(--cream);
}
.doc .steps li {
  margin: 0.5em 0;
}
.doc kbd {
  font-family: inherit;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 7px;
  border: 1px solid var(--bark-4);
  border-bottom-width: 3px;
  background: var(--bark-3);
  color: var(--cream);
}

/* ---------- 404 ---------- */
.lost {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px var(--gutter);
}
.lost img {
  width: min(360px, 72vw);
  margin-bottom: 24px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}
.lost h1 {
  font-size: 2rem;
  color: var(--honey);
  text-shadow: 0 3px 0 var(--outline);
  margin-bottom: 8px;
}
.lost p {
  color: var(--mist);
}
.lost .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

/* ---------- 手機 ---------- */
@media (max-width: 840px) {
  .doc .toc {
    columns: 1;
  }
}
@media (max-width: 520px) {
  .top {
    flex-wrap: wrap;
  }
  .top .brand img {
    height: 44px;
  }
  .top nav {
    gap: 4px 14px;
    font-size: 0.9rem;
  }
  .doc {
    margin: 16px -8px;
    border-radius: 16px;
  }
  .doc h1 {
    font-size: 1.8rem;
  }
  .doc th,
  .doc td {
    padding: 6px 8px;
  }
}

/* 封測預約的結果頁（site/prereg/）：取消通知的按鈕包在表單裡 */
.lost form {
  display: contents;
}
.lost p {
  max-width: 46ch;
}
