/*
  全站樣式：平面、不加外框、不加陰影，用底色深淺分層次。
  顏色、字型、尺寸都集中在 :root 的變數裡。
*/

:root {
  /* 底色：微暖的米白，比純白不刺眼 */
  --bg: #f7f6f3;
  /* 區塊底色：比底色深一階 */
  --panel: #eae8e2;
  --text: #2a2a2c;
  --muted: #76767b;
  --line: #dcdbd5;
  --accent: #3a62c4;

  /* 微軟正黑只有 Windows 有；iPhone、Mac 會改用蘋方 */
  --font: "Microsoft JhengHei", "PingFang TC", "Heiti TC", sans-serif;
  --serif: "Songti TC", "Noto Serif TC", "PMingLiU", serif;

  --width: 48rem;     /* 內容最大寬度 */
  --radius: 28px;     /* 區塊圓角 */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18181a;
    --panel: #232326;
    --text: #e8e8ea;
    --muted: #9b9ba3;
    --line: #333338;
    --accent: #8fa9ff;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

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

h1,
h2,
h3 {
  line-height: 1.4;
}

/* ---- 版面 ---- */

main,
.site-footer {
  width: min(100% - 2rem, var(--width));
  margin-inline: auto;
}

main {
  padding-block: 2rem 4rem;
}

.site-footer {
  padding-block: 2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* 區塊：首頁各欄共用的圓角底色框 */
.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
}

.panel hr {
  margin: 1.5rem 0 1.25rem;
  border: 0;
  border-top: 1px solid var(--line);
}

/* ---- 首頁 ---- */

.home-header {
  text-align: center;
  padding-block: 2rem 1rem;
}

.home-header h1 {
  margin: 0;
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.home-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.home-section {
  margin-top: 2.5rem;
}

.home-section h2 {
  margin: 0 0 0.75rem 0.5rem;
  font-size: 1.25rem;
  font-weight: 400;
}

/* ---- 手機遊戲 ---- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 1.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text);
  text-decoration: none;
}

.game-grid img {
  width: 88px;
  height: 88px;
  border-radius: 20px;  /* 約為 iOS 圖示的圓角比例 */
  margin-bottom: 0.5rem;
}

.game-name {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.game-tagline {
  font-size: 0.8125rem;
  color: var(--muted);
}

.game-grid a:hover .game-name {
  color: var(--accent);
}

/* ---- 言情小說：文字封面 ---- */

.novel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 1.75rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.novel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text);
  text-decoration: none;
}

.novel-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 128px;
  margin-bottom: 0.5rem;
  background: var(--cover);
  border-radius: 8px;
}

.novel-cover-title {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: #fff;
}

.novel-status {
  position: absolute;
  top: -0.5rem;
  right: -0.75rem;
  padding: 0 0.5rem;
  background: #f9d967;
  color: #3f2c2f;
  font-size: 0.6875rem;
  line-height: 1.6;
  border-radius: 999px;
}

.novel-name {
  font-size: 0.9375rem;
  line-height: 1.5;
}

a.novel:hover .novel-name {
  color: var(--accent);
}

.novel-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.375rem;
}

.novel-tags span {
  padding: 0 0.5rem;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.75rem;
  border-radius: 999px;
}

/* 欄位下方的文字項目（分隔線以下） */
.note-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-list li + li {
  margin-top: 0.5rem;
}

.note-list a {
  color: var(--text);
}

.soon {
  margin-left: 0.5em;
  color: var(--muted);
  font-size: 0.875rem;
}

.soon::before {
  content: "（";
}

.soon::after {
  content: "）";
}

/* ---- 手機 ---- */

@media (max-width: 30rem) {
  .home-header h1 {
    font-size: 2.5rem;
  }

  .panel {
    padding: 1.25rem;
    border-radius: 22px;
  }
}
