
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-alt: #f3ede2;
  --border: #dfd5c5;
  --ink: #1f1a17;
  --muted: #6b5f54;
  --accent: #c8553d;
  --sage: #3f6f62;
  --gold: #c68a1e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Georgia, serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
.mp-game-shell { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; box-shadow: 0 6px 24px rgba(31,26,23,0.05); }
.mp-topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.mp-game-title { font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; margin-top: 6px; letter-spacing: -0.01em; }
.mp-pill { display: inline-block; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 9px; border-radius: 999px; background: var(--surface-alt); color: var(--muted); border: 1px solid var(--border); margin-right: 6px; }
.mp-pill-diff { background: #fbeae5; color: var(--accent); border-color: #ecc5b9; }
.mp-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-timer { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 0.96rem; padding: 6px 10px; border-radius: 8px; background: var(--surface-alt); border: 1px solid var(--border); }
.mp-btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); padding: 7px 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.mp-btn-ghost:hover, .mp-btn-ghost.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.mp-btn-primary { background: var(--accent); color: #fff; border: none; padding: 9px 16px; border-radius: 9px; font-size: 0.9rem; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.mp-btn-primary:hover { filter: brightness(0.94); }
.mp-story { color: var(--muted); font-size: 0.96rem; margin-bottom: 18px; }
.mp-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.mp-box h3 { font-size: 0.96rem; font-weight: 700; margin-bottom: 8px; }
.mp-box-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.mp-box-head h3 { margin-bottom: 0; }
.mp-muted { color: var(--muted); font-size: 0.82rem; }
.mp-toggle { font-size: 0.84rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.mp-feedback { margin-top: 12px; border-radius: 10px; font-size: 0.92rem; }
.mp-feedback.is-win { padding: 14px; background: #e6f4ee; border: 1px solid #9bd1ba; color: #164e3b; }
.mp-feedback.is-warn { padding: 12px; background: #fef7e0; border: 1px solid #ecd085; color: #7a5200; }
.mp-feedback.is-err { padding: 12px; background: #fdecec; border: 1px solid #f0b2b2; color: #8c1d18; }

.cg-layout { display: grid; grid-template-columns: 330px 1fr; gap: 16px; }
@media (max-width: 860px) { .cg-layout { grid-template-columns: 1fr; } }
.cg-clues { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cg-clue-item { padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 0.89rem; cursor: pointer; display: flex; gap: 7px; }
.cg-clue-item.is-done { opacity: 0.5; text-decoration: line-through; background: var(--surface-alt); }
.cg-clue-num { font-weight: 700; color: var(--accent); }
.cg-final-evidence { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #fff4e5; border: 1px solid #ecc692; font-size: 0.88rem; font-weight: 600; color: #6c3b00; }
.cg-dossier { display: flex; flex-direction: column; gap: 8px; }
.cg-card-mini { display: flex; gap: 10px; align-items: flex-start; padding: 8px; background: var(--surface); border-radius: 8px; border: 1px solid var(--border); font-size: 0.86rem; }
.cg-emoji { font-size: 1.25rem; line-height: 1.2; }
.cg-table-wrap { overflow-x: auto; }
.cg-table { border-collapse: collapse; margin: 0 auto; background: var(--surface); }
.cg-table th, .cg-table td { border: 1px solid #d4c8b6; padding: 0; }
.cg-corner { padding: 6px 8px !important; font-size: 0.78rem; color: var(--muted); background: var(--surface-alt); }
.cg-col-hdr { width: 42px; height: 112px; vertical-align: bottom; background: var(--surface-alt); font-size: 0.74rem; font-weight: 600; }
.cg-hdr-inner { writing-mode: vertical-rl; transform: rotate(180deg); padding: 6px 4px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.cg-row-hdr { text-align: left; padding: 6px 10px !important; font-size: 0.8rem; font-weight: 600; background: var(--surface-alt); white-space: nowrap; }
.cg-sep-left { border-left: 2.5px solid var(--ink) !important; }
.cg-sep-top td, .cg-sep-top th { border-top: 2.5px solid var(--ink) !important; }
.cg-cell { width: 42px; height: 38px; border: none; background: #fff; cursor: pointer; font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.cg-cell:hover { background: #f6efe6; }
.cg-cell.is-yes { background: #dff4ea; color: #1b6b4c; }
.cg-cell.is-no { background: #faf4ef; color: #b5a79a; }
.cg-dead-zone { background: var(--bg); color: var(--muted); font-size: 0.76rem; text-align: center; padding: 10px !important; }
.cg-accuse-row { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 8px; }
@media (max-width: 680px) { .cg-accuse-row { grid-template-columns: 1fr; } }
.cg-accuse-row select { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 0.88rem; color: var(--ink); }

.cr-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cr-board { display: grid; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; user-select: none; }
.cr-cell { aspect-ratio: 1 / 1; cursor: pointer; font-size: 1.35rem; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: transform 0.08s; }
.cr-cell.is-x { color: rgba(31,26,23,0.45); font-size: 1.1rem; }
.cr-cell.is-bad { box-shadow: inset 0 0 0 3px #d62828; background: #ffc2c2 !important; }
.cr-side { width: 100%; max-width: 480px; text-align: center; }

.pg-stage { display: flex; flex-direction: column; align-items: center; }
.pg-wrap { overflow-x: auto; max-width: 100%; }
.pg-table { border-collapse: collapse; user-select: none; background: #fff; }
.pg-table td, .pg-table th { border: 1px solid #d4c8b6; }
.pg-cclue { vertical-align: bottom; padding: 4px 2px; font-size: 0.75rem; font-weight: 700; color: var(--ink); background: var(--surface-alt); min-width: 28px; line-height: 1.15; }
.pg-rclue { text-align: right; padding: 2px 7px; font-size: 0.76rem; font-weight: 700; color: var(--ink); background: var(--surface-alt); white-space: nowrap; }
.pg-rclue span { margin-left: 5px; }
.pg-rclue.is-ok, .pg-cclue.is-ok { color: #b5a79a; }
.pg-cell { width: 28px; height: 28px; border: none; background: #fff; cursor: pointer; font-size: 0.9rem; font-weight: 700; color: #b5a79a; display: block; }
.pg-sep-l { border-left: 2.5px solid var(--ink) !important; }
.pg-sep-t td, .pg-sep-t th { border-top: 2.5px solid var(--ink) !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 18px 70px; }
header.site-hdr {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1.5px solid var(--border);
}
.brand { font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 0.9rem; font-weight: 600; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta { background: var(--ink); color: #fff !important; padding: 7px 13px; border-radius: 999px; font-size: 0.84rem; }
.nav-cta:hover { background: var(--accent); }
.streak-chip { font-size: 0.82rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #fff4e0; border: 1px solid #e7c888; color: #7a4d00; }

.hero { margin-bottom: 24px; }
.hero h1 { font-family: Georgia, serif; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 10px; }
.hero p { color: var(--muted); font-size: 1.03rem; max-width: 740px; }

.daily-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.daily-tab {
  background: var(--surface); border: 1.5px solid var(--border); color: var(--ink);
  padding: 10px 16px; border-radius: 12px; font-size: 0.93rem; font-weight: 700; cursor: pointer;
}
.daily-tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.section { margin-top: 42px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section h2 { font-family: Georgia, serif; font-size: 1.45rem; }
.section-head a { color: var(--accent); font-weight: 700; font-size: 0.9rem; text-decoration: none; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.puz-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; text-decoration: none; color: var(--ink); transition: transform 0.12s, border-color 0.12s;
}
.puz-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.puz-card h3 { font-family: Georgia, serif; font-size: 1.06rem; }
.puz-card p { color: var(--muted); font-size: 0.86rem; }

.store-banner {
  margin-top: 38px; padding: 26px; border-radius: 18px;
  background: linear-gradient(135deg, #251d18 0%, #3a2b22 100%); color: #faf7f2;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: center;
}
@media (max-width: 780px) { .store-banner { grid-template-columns: 1fr; } }
.store-banner h2 { font-family: Georgia, serif; font-size: 1.55rem; margin-bottom: 8px; color: #fff; }
.store-banner p { color: #d9cec2; font-size: 0.95rem; margin-bottom: 14px; }
.store-mini-list { display: flex; flex-direction: column; gap: 10px; }
.store-mini-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  padding: 12px 14px; border-radius: 12px; text-decoration: none; color: #fff;
}
.store-mini-item:hover { background: rgba(255,255,255,0.14); }
.store-mini-item.is-featured { border-color: #f0b65b; background: rgba(240,182,91,0.14); }
.price-tag { font-weight: 800; font-size: 1.05rem; color: #ffd180; white-space: nowrap; }

.book-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
@media (max-width: 840px) { .book-tiers { grid-template-columns: 1fr; } }
.tier-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px;
  padding: 22px; display: flex; flex-direction: column; justify-content: space-between;
}
.tier-card.best { border-color: var(--accent); box-shadow: 0 10px 30px rgba(200,85,61,0.12); position: relative; }
.tier-badge { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: #fff; margin-bottom: 10px; }
.tier-price { font-family: Georgia, serif; font-size: 2.1rem; font-weight: 700; margin: 10px 0; }
.tier-price small { font-family: sans-serif; font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.tier-list { list-style: none; margin: 14px 0 20px; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.tier-list li::before { content: "✓ "; color: var(--sage); font-weight: 800; }

.prose { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.prose h1 { font-family: Georgia, serif; font-size: 1.9rem; margin-bottom: 12px; }
.prose h2 { font-family: Georgia, serif; font-size: 1.32rem; margin: 22px 0 8px; }
.prose p, .prose li { color: var(--muted); margin-bottom: 10px; font-size: 0.96rem; }
.prose ul, .prose ol { padding-left: 22px; }

footer.site-ftr {
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  color: var(--muted); font-size: 0.85rem;
}
footer.site-ftr a { color: var(--muted); text-decoration: none; }
footer.site-ftr a:hover { color: var(--ink); }
