/* =========================
 Base Reset / 全站基礎重置
 ========================= */

* {
  box-sizing: border-box;
}

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

/* =========================
 Body / 全站字體與背景
 ========================= */

body {
  margin: 0;
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
  background: linear-gradient(180deg, #f5e8cf 0%, #f8f1e2 100%);
  color: #3f2417;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

/* =========================
 Media / 圖片與影片基礎規則
 避免超出容器
 ========================= */

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

/* =========================
 Form Elements / 表單元件字體統一
 ========================= */

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  cursor: pointer;
}

/* =========================
 Links / 連結基礎樣式
 ========================= */

a {
  color: inherit;
  text-decoration: none;
}

/* =========================
 Typography Reset / 標題與段落預設間距
 ========================= */

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-top: 0;
}

p,
li {
  word-break: normal;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6,
button,
.btn {
  word-break: keep-all;
  overflow-wrap: normal;
}

ul,
ol {
  margin-top: 0;
}

/* =========================
 Utility / 共用工具類
 ========================= */

.hidden {
  display: none !important;
}

/* 2026-10-14 fix: the native `hidden` attribute has the same specificity as
   any single-class selector (e.g. .button-row { display: flex }), and since
   author rules load after the UA stylesheet, a flex/grid display override
   was silently winning and showing elements meant to stay hidden. Restores
   the HTML-spec-intended behavior everywhere, not just this page. */
[hidden] {
  display: none !important;
}

/* =========================
 Layout Container / 頁面主容器
 ========================= */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 14px 40px;
}

/* =========================
 Base Card / 共用卡片外觀
 可用於主要容器或文件區塊
 ========================= */

.card {
  background: #fff8ec;
  border: 2px solid rgba(92, 52, 28, 0.14);
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(92, 52, 28, 0.12);
}

/* =========================
 Base Typography Helpers / 共用標題與文字
 ========================= */

.primary-title {
  margin-bottom: 10px;
  color: #4a2416;
  text-align: center;
}

.page-text {
  color: #5a3422;
  line-height: 1.8;
  text-align: center;
}

/* =========================
 Buttons / 共用按鈕基礎樣式
 .btn 與 .icon-link 共用同一套外觀
 ========================= */

.btn,
.icon-link {
  border: none;
  background: linear-gradient(180deg, #7a3f22 0%, #5b2d19 100%);
  color: #f7e2b6;
  font-size: 16px;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  min-width: 96px;
  box-shadow: 0 6px 14px rgba(91, 45, 25, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

/* 主要開始按鈕 */
.btn-start {
  background: linear-gradient(180deg, #355347 0%, #274037 100%);
}

/* 金幣 / 補給類按鈕 */
.btn-coin {
  background: linear-gradient(180deg, #b9872f 0%, #8d6220 100%);
}

/* 次要功能按鈕 */
.btn-secondary {
   background: linear-gradient(180deg, #8f5a3f 0%, #6d412d 100%);
}

/* 禮物 / 兌換頁導流按鈕 */
.btn-gift {
  background: linear-gradient(180deg, #355347 0%, #274037 100%);
}

/* =========================
 Section Card / 區塊卡片基礎樣式
 可給娃娃機、排行榜、展示櫃等區塊共用
========================= */

.section-card {
  background: #fff8ec;
  border: 2px solid rgba(92, 52, 28, 0.14);
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(92, 52, 28, 0.12);
  padding: 16px;
}

/* =========================
 Mobile Base / 手機版基礎調整
 ========================= */

@media screen and (max-width: 900px) {
  .wrap {
    padding: 14px 10px 28px;
  }

  .btn,
  .icon-link {
    width: 100%;
    min-width: 0;
  }
}

