/* tinyworld 共享样式 —— 由原 index.html / snake.html 两处内联样式合并提取，视觉保持不变。
   模块类名约定：核心用 tw- 前缀；卡片/区块沿用原有类名（game-card / game-grid / section-title）。 */

/* ── 基础与纸感背景 ───────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #faf6ef;
    background-image: radial-gradient(circle, #e8dfcd 1px, transparent 1px);
    background-size: 24px 24px;
    color: #3d3929;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 2rem;
}
.container { text-align: center; padding: 3rem 2rem 2rem; width: 100%; max-width: 800px; }
h1 {
    font-size: 3rem; margin-bottom: 0.5rem; color: #3d3929;
    font-family: 'Kaiti SC', 'KaiTi', 'Noto Serif SC', serif;
    display: inline-block; padding: 0 0.3rem;
    background: linear-gradient(transparent 64%, rgba(201,65,67,0.20) 64%);
}
.subtitle {
    font-size: 1rem; color: #8a8271; margin: 0 auto 1.5rem;
    max-width: 34em; line-height: 1.9; letter-spacing: 0.02em;
}
.logo { max-width: 260px; max-height: 160px; height: auto; display: block; margin: 0 auto 0.8rem; border-radius: 12px; }
.about-photo { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid #e4d9c3; margin: 0.4rem 0 1rem; }

/* ── 顶部导航（由模块注册表派生）─────────────────────────── */
.tw-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin: 0 auto 1.5rem; }
.tw-nav-link {
    color: #3d3929; text-decoration: none; padding: 0.45rem 0.9rem; font-size: 0.9rem;
    background: #fffdf8; border: 1px solid #ddd2bd; border-radius: 8px; transition: all 0.25s;
}
.tw-nav-link:hover { border-color: #c94143; color: #c94143; }
.tw-nav-link.is-active { border-color: #c94143; color: #c94143; background: #fdf0ee; }
.tw-nav-icon { margin-right: 0.25rem; }

/* ── 区块与卡片 ───────────────────────────────────────────── */
.section-title {
    font-size: 1.3rem; margin: 2rem 0 1rem; color: #3d3929;
    display: inline-block; border-left: 4px solid #c94143; padding-left: 0.6rem;
}
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.game-card {
    background: #fffdf8; border: 1px solid #e4d9c3; border-radius: 12px; padding: 1.5rem; cursor: pointer;
    transition: all 0.3s; text-decoration: none; color: #3d3929;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(93,80,60,0.08);
}
.game-card:hover { border-color: #c94143; transform: translateY(-4px); box-shadow: 0 6px 14px rgba(93,80,60,0.14); }
.game-card.is-todo { cursor: default; opacity: 0.72; }
.game-card.is-todo:hover { border-color: #e4d9c3; transform: none; box-shadow: 0 2px 6px rgba(93,80,60,0.08); }
.game-icon { font-size: 2.5rem; }
.game-name { font-size: 1rem; font-weight: 600; }
.game-desc { font-size: 0.8rem; color: #8a8271; }
.game-tag { font-size: 0.7rem; color: #a89e8a; border: 1px dashed #ddd2bd; border-radius: 6px; padding: 0.05rem 0.4rem; }

/* ── 正文与列表 ───────────────────────────────────────────── */
.prose { text-align: left; line-height: 1.8; margin: 0.6rem 0; color: #4a4436; font-size: 0.95rem; }
.tw-hello { text-align: center; color: #8a8271; margin-bottom: 0.5rem; }
.tw-block { text-align: left; }
.back-link { color: #8a8271; text-decoration: none; font-size: 0.9rem; display: inline-block; margin-bottom: 1rem; }
.back-link:hover { color: #c94143; }
.tw-post-h { font-size: 1.6rem; margin: 0.4rem 0; text-align: left; background: none; font-family: 'Kaiti SC','KaiTi','Noto Serif SC',serif; }
.tw-post-meta { color: #a89e8a; font-size: 0.85rem; text-align: left; margin-bottom: 1rem; }
.tw-posts { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0 2rem; text-align: left; }
.tw-post-item {
    display: flex; gap: 0.8rem; align-items: baseline; text-decoration: none; color: #3d3929;
    background: #fffdf8; border: 1px solid #e4d9c3; border-radius: 10px; padding: 0.8rem 1rem; transition: all 0.25s;
}
.tw-post-item:hover { border-color: #c94143; transform: translateX(3px); }
.tw-post-date { color: #a89e8a; font-size: 0.8rem; flex: 0 0 auto; }
.tw-post-title { font-weight: 600; flex: 1 1 auto; }
.tw-post-tags { color: #a89e8a; font-size: 0.78rem; flex: 0 0 auto; }

/* ── 页脚状态 ─────────────────────────────────────────────── */
.status { margin-top: 2rem; font-size: 0.85rem; color: #a89e8a; text-align: center; }

/* ── 关于页联系区 ─────────────────────────────────────────── */
.contact { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin: 1.4rem 0 0.4rem; }
.contact-link {
  display: inline-block; padding: 0.55rem 1.1rem; border-radius: 8px; text-decoration: none;
  background: #fffdf8; border: 1px solid #ddd2bd; color: #3d3929; font-size: 0.92rem; transition: all .25s;
}
.contact-link:hover { border-color: #c94143; color: #c94143; transform: translateY(-2px); }
.tw-empty { text-align: center; color: #a89e8a; font-size: 0.92rem; margin: 1.6rem 0; }
/* ── 关于页二维码块 ───────────────────────────────────────── */
.qr { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin: 1.6rem 0 0.4rem; }
.qr-img { width: 180px; height: auto; border-radius: 12px; border: 1px solid #e4d9c3; background: #fffdf8; }
.qr-name { font-weight: 600; color: #3d3929; font-size: 0.95rem; margin-top: 0.3rem; }
.qr-tip { font-size: 0.85rem; color: #a89e8a; }
/* ── 内容配置页 ───────────────────────────────────────────── */
.cfg-group { margin: 1.5rem 0 0.6rem; font-size: 1rem; color: #3d3929; }
.cfg-row {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.7rem;
  border: 1px solid #e6dcc8; border-radius: 8px; background: #fffdf8; margin-bottom: 0.45rem;
}
.cfg-row.is-locked { opacity: 0.62; }
.cfg-box { width: 1.05rem; height: 1.05rem; accent-color: #c94143; flex: none; }
.cfg-name { font-size: 0.95rem; color: #3d3929; flex: none; }
.cfg-note { font-size: 0.82rem; color: #a89e8a; margin-left: auto; text-align: right; }
.cfg-note.is-block { display: block; margin: 1rem 0 0; text-align: left; line-height: 1.7; }
.cfg-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.4rem 0 0.4rem; }
.cfg-btn {
  padding: 0.5rem 1rem; border-radius: 8px; border: 1px solid #ddd2bd; background: #fffdf8;
  color: #3d3929; font-size: 0.92rem; cursor: pointer; transition: all .25s; font-family: inherit;
}
.cfg-btn:hover { border-color: #c94143; color: #c94143; }
.cfg-tip { font-size: 0.85rem; color: #7a8a5a; min-height: 1.2rem; margin-top: 0.5rem; }

/* 页脚备案信息（2026-10-14） */
footer.status { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
footer.status a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
footer.status a:hover { color: #c94143; }
.tw-dim { opacity: .75; }
