/* 보드빌리지 매거진 & 게임 도우미 디자인 시스템 */
:root {
  --village-ink: #172635;
  --village-wood: #1e3a5f;
  --village-amber: #d97706;
  --village-accent: #ea580c;
  --village-muted: #5c6974;
  --village-line: #e2e8f0;
  --village-paper: #ffffff;
  --village-cream: #faf7f2;
  --village-card: #f8fafc;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--village-ink);
  background: var(--village-paper);
  font-family: system-ui, -apple-system, "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--village-wood); text-underline-offset: 4px; }
img { max-width: 100%; height: auto; }
a:focus-visible, summary:focus-visible, input:focus-visible, button:focus-visible, select:focus-visible {
  outline: 3px solid var(--village-amber);
  outline-offset: 4px;
}
h1, h2, h3 { line-height: 1.4; letter-spacing: -0.03em; color: var(--village-ink); }
p { margin: 0 0 1.2em; }
.skip {
  position: absolute; left: 16px; top: -100px; background: white; padding: 12px; z-index: 100;
}
.skip:focus { top: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}

/* Header & Navigation */
.masthead {
  background: white; border-bottom: 2px solid var(--village-ink); position: relative; z-index: 20;
}
.utility {
  max-width: 1280px; margin: auto; display: flex; justify-content: space-between;
  padding: 10px 24px; color: var(--village-muted); font-size: 12px; border-bottom: 1px solid #edf0f2;
}
.utility div { display: flex; gap: 20px; }
.utility a { text-decoration: none; color: inherit; }
.masthead-main {
  max-width: 1280px; margin: auto; padding: 20px 24px; display: grid;
  grid-template-columns: auto auto 1fr auto; align-items: center; gap: 22px; position: relative;
}
.wordmark {
  color: var(--village-ink); font-size: 38px; letter-spacing: -2px; font-weight: 900;
  text-decoration: none; white-space: nowrap;
}

/* Header Search Input Button */
.header-search-wrap {
  width: 100%; max-width: 460px; justify-self: center;
}
.header-search-btn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: var(--village-cream); border: 1.5px solid #cbd5e1; border-radius: 28px;
  padding: 10px 18px; font-size: 14px; color: var(--village-muted); cursor: pointer;
  transition: all 0.2s ease; text-align: left;
}
.header-search-btn:hover {
  border-color: var(--village-accent); background: #fff; box-shadow: 0 3px 12px rgba(234, 88, 12, 0.12);
}
.search-btn-icon { font-size: 16px; }
.search-btn-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-btn-kbd {
  background: #e2e8f0; color: #475569; padding: 2px 7px; border-radius: 4px;
  font-size: 11px; font-weight: 700; font-family: monospace; border: 1px solid #cbd5e1;
}

.brand-mascot {
  justify-self: end; display: flex; align-items: center; gap: 10px; font-size: 11px;
  line-height: 1.3; letter-spacing: 0.5px; text-decoration: none; color: var(--village-wood);
}
.brand-mascot img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #f59e0b;
}
.topic-nav {
  max-width: 1280px; margin: auto; display: flex; justify-content: center; gap: 20px;
  padding: 12px 24px; overflow-x: auto; white-space: nowrap;
}
.topic-nav a {
  text-decoration: none; color: var(--village-ink); font-size: 15px; font-weight: 700;
}
.topic-nav a:hover { color: var(--village-accent); }
.nav-highlight {
  color: var(--village-accent) !important; font-weight: 850 !important;
}
.app-nav-link {
  color: var(--village-accent) !important; background: #fff7ed; padding: 3px 12px;
  border-radius: 20px; border: 1px solid #fed7aa;
}

/* Mega menu */
.all-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; font-size: 19px; font-weight: 800;
}
.all-menu summary::-webkit-details-marker { display: none; }
.all-menu[open] summary { color: var(--village-accent); }
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: white;
  border: 1px solid var(--village-line); box-shadow: 0 15px 30px rgba(0,0,0,0.12);
  padding: 24px 28px 28px; z-index: 30;
}
.mega-search-row {
  display: flex; align-items: center; gap: 15px; padding-bottom: 20px; margin-bottom: 20px;
  border-bottom: 1px solid var(--village-line); flex-wrap: wrap;
}
.mega-search-box {
  display: flex; align-items: center; gap: 10px; background: var(--village-cream);
  border: 1.5px solid #cbd5e1; border-radius: 6px; padding: 8px 14px; flex: 1; max-width: 460px;
}
.mega-search-input {
  border: 0; background: transparent; font-size: 14px; width: 100%; outline: none;
}
.mega-search-hint { font-size: 13px; color: var(--village-muted); }
.mega-columns {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px;
}
.mega-col h3 { font-size: 16px; margin: 0 0 14px; color: var(--village-wood); }
.mega-col a { display: block; font-size: 13px; color: var(--village-ink); text-decoration: none; margin: 0 0 11px; }
.mega-col a:hover { color: var(--village-accent); text-decoration: underline; }

/* Global Search Modal */
.search-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 1000; display: none; align-items: flex-start; justify-content: center;
  padding: 60px 16px 20px; overflow-y: auto;
}
.search-modal-backdrop.is-open { display: flex; }
.search-modal-box {
  background: white; width: 100%; max-width: 680px; border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); border: 1px solid var(--village-line);
  overflow: hidden; display: flex; flex-direction: column; max-height: 82vh; animation: modalSlide 0.2s ease-out;
}
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}
.search-modal-header {
  padding: 18px 20px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--village-line);
}
.search-input-wrap {
  display: flex; align-items: center; gap: 12px; flex: 1; background: var(--village-cream);
  border: 1.5px solid #cbd5e1; border-radius: 8px; padding: 10px 16px;
}
.search-input-wrap:focus-within { border-color: var(--village-accent); background: white; }
.search-modal-icon { font-size: 18px; color: var(--village-muted); }
.search-input-wrap input {
  border: 0; background: transparent; font-size: 16px; width: 100%; outline: none; font-weight: 600;
}
.search-clear-btn {
  background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--village-muted); padding: 0 4px;
}
.search-close-btn {
  background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px 14px;
  font-size: 12px; font-weight: 700; color: #475569; cursor: pointer;
}
.search-close-btn:hover { background: #e2e8f0; }

.search-filter-tabs {
  display: flex; gap: 6px; padding: 10px 20px; background: #fafaf9; border-bottom: 1px solid var(--village-line);
  overflow-x: auto; white-space: nowrap;
}
.tab-btn {
  background: white; border: 1px solid #cbd5e1; padding: 6px 14px; border-radius: 20px;
  font-size: 12.5px; font-weight: 700; color: #475569; cursor: pointer; transition: all 0.15s;
}
.tab-btn:hover { border-color: var(--village-accent); color: var(--village-accent); }
.tab-btn.active {
  background: var(--village-accent); border-color: var(--village-accent); color: white;
}

.search-suggestions {
  padding: 16px 20px; border-bottom: 1px solid #f1f5f9; background: #fff;
}
.suggestion-title { font-size: 12px; font-weight: 800; color: var(--village-muted); margin-bottom: 10px; text-transform: uppercase; }
.suggestion-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-chip {
  background: #f1f5f9; border: 0; padding: 6px 12px; border-radius: 6px; font-size: 13px;
  font-weight: 600; color: #334155; cursor: pointer; transition: background 0.15s;
}
.tag-chip:hover { background: #fee2e2; color: #c2410c; }

.search-results {
  padding: 12px 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px;
}
.search-result-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 8px;
  text-decoration: none; color: inherit; transition: background 0.15s, transform 0.1s; border: 1px solid transparent;
}
.search-result-item:hover, .search-result-item.selected {
  background: #fff7ed; border-color: #fed7aa; transform: translateX(2px);
}
.search-item-img {
  width: 48px; height: 48px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #f1f5f9;
}
.search-item-body { flex: 1; min-width: 0; }
.search-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.search-item-badge {
  font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 4px; color: white; white-space: nowrap;
}
.search-item-title {
  font-size: 15px; font-weight: 750; color: var(--village-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item-title mark { background: #fef08a; padding: 0 2px; border-radius: 2px; color: inherit; }
.search-item-meta { font-size: 12px; color: var(--village-muted); margin-bottom: 3px; font-weight: 600; }
.search-item-desc {
  font-size: 12.5px; color: #64748b; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item-arrow { color: #cbd5e1; font-size: 18px; font-weight: 700; }
.search-result-item:hover .search-item-arrow { color: var(--village-accent); }

.search-empty {
  padding: 40px 20px; text-align: center; color: var(--village-muted);
}
.search-empty strong { display: block; font-size: 17px; color: var(--village-ink); margin-bottom: 8px; }
.search-empty p { font-size: 14px; margin-bottom: 16px; }

.search-modal-footer {
  padding: 10px 20px; background: #fafaf9; border-top: 1px solid var(--village-line);
  display: flex; gap: 16px; font-size: 12px; color: var(--village-muted); align-items: center;
}
.search-modal-footer kbd {
  background: white; border: 1px solid #cbd5e1; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700;
}
.search-db-badge { margin-left: auto; color: var(--village-accent); font-weight: 700; }

/* Rules Page Dedicated Search Hero */
.rules-hero-search {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1.5px solid #fed7aa; border-radius: 10px; padding: 28px 24px; margin-bottom: 32px;
}
.rules-hero-search h2 { font-size: 26px; margin: 0 0 8px; color: #9a3412; }
.rules-hero-search p { font-size: 15px; color: #7c2d12; margin: 0 0 18px; }
.rules-search-input-wrap {
  display: flex; align-items: center; gap: 12px; background: white;
  border: 2px solid #ea580c; border-radius: 8px; padding: 12px 18px; max-width: 640px;
}
.rules-search-input-wrap input {
  border: 0; background: transparent; font-size: 16px; width: 100%; outline: none; font-weight: 600;
}
.rules-quick-tags {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: #9a3412;
}
.rule-quick-tag {
  background: white; border: 1px solid #fed7aa; color: #9a3412; padding: 4px 10px;
  border-radius: 16px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.rule-quick-tag:hover { background: #ea580c; color: white; border-color: #ea580c; }
.rules-search-count {
  margin-top: 12px; font-size: 13.5px; font-weight: 800; color: #ea580c; min-height: 1.5em;
}

/* 인원별 추천 전용 탭 바 (Player Count Filter Bar) */
.player-filter-tabs {
  display: flex; gap: 10px; margin: 20px 0 30px; flex-wrap: wrap;
}
.p-tab-btn {
  background: white; border: 1.5px solid #cbd5e1; border-radius: 24px; padding: 10px 20px;
  font-size: 14.5px; font-weight: 750; color: #334155; cursor: pointer; transition: all 0.15s ease;
}
.p-tab-btn:hover { border-color: var(--village-accent); color: var(--village-accent); }
.p-tab-btn.active {
  background: var(--village-accent); border-color: var(--village-accent); color: white;
}

/* Main layout */
main { max-width: 1280px; margin: 0 auto; padding: 32px 24px 70px; }
.home-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 1.1fr); gap: 35px; }
.eyebrow { font-size: 12px; color: var(--village-accent); font-weight: 800; letter-spacing: 1px; margin-bottom: 12px; text-transform: uppercase; }

/* Story cards */
.story { min-width: 0; }
.story > a { display: block; text-decoration: none; color: var(--village-ink); }
.story-image { position: relative; overflow: hidden; background: var(--village-cream); border-radius: 6px; }
.story-image img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform 0.3s; }
.story a:hover img { transform: scale(1.03); }
.story-image > span {
  position: absolute; left: 10px; bottom: 10px; background: rgba(23, 38, 53, 0.9);
  color: white; padding: 4px 8px; font-size: 11px; font-weight: 600; border-radius: 4px;
}
.story-copy small { color: var(--village-accent); font-size: 12px; font-weight: 750; display: block; margin: 12px 0 6px; }
.story-copy h3 { font-size: 20px; margin: 0 0 10px; }
.story-copy p {
  font-size: 14px; color: var(--village-muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Feature story */
.feature-story > a { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 25px; align-items: center; }
.feature-story .story-image img { aspect-ratio: 4/3; }
.feature-story .story-copy h3 { font-size: 28px; }
.feature-story .story-copy p { font-size: 15px; -webkit-line-clamp: 4; }

/* Editor picks & App banner */
.editor-picks { border-top: 3px solid var(--village-ink); padding-top: 15px; }
.editor-picks h2 { font-size: 22px; margin: 0 0 6px; }
.editor-picks > p { font-size: 12px; color: var(--village-muted); }
.editor-picks ol { padding: 0 0 0 22px; margin: 15px 0; }
.editor-picks li { padding: 10px 0; border-bottom: 1px solid var(--village-line); font-size: 14px; font-weight: 600; }
.editor-picks li a { color: var(--village-ink); text-decoration: none; }
.editor-picks li a:hover { color: var(--village-accent); }

/* App connection banner */
.app-banner {
  display: block; padding: 20px; background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa; border-left: 4px solid var(--village-accent); border-radius: 8px;
  text-decoration: none; margin-top: 24px; box-shadow: 0 4px 14px rgba(234, 88, 12, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.app-banner:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(234, 88, 12, 0.16); }
.app-banner strong { display: block; font-size: 17px; color: #9a3412; font-weight: 800; }
.app-banner span { display: block; font-size: 13px; color: #7c2d12; margin-top: 6px; line-height: 1.5; }

/* Category sections */
.category-section { margin: 50px 0 60px; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 3px solid var(--village-ink); padding: 14px 0 0;
}
.section-title h2 { font-size: 26px; margin: 0; }
.section-title a { color: var(--village-ink); text-decoration: none; }
.section-title > a { font-size: 13px; color: var(--village-accent); font-weight: 700; }
.section-desc { font-size: 14px; color: var(--village-muted); margin: 10px 0 24px; }
.stories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 22px; }

/* 도감 카드 디자인 */
.enc-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.enc-preview-card {
  padding: 14px; background: white; border: 1px solid var(--village-line); border-radius: 8px; text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.enc-preview-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.enc-preview-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.enc-preview-card strong { display: block; font-size: 15px; margin-bottom: 4px; }
.enc-preview-card span { font-size: 12px; color: var(--village-muted); }

.enc-filter-box {
  background: var(--village-cream); padding: 20px; border-radius: 8px; border: 1px solid #ebdccb; margin: 20px 0 30px;
}
.enc-filter-box input[type="search"] {
  width: 100%; padding: 14px 18px; font-size: 16px; border: 1px solid #cbd5e1; border-radius: 6px; margin-bottom: 15px;
}
.enc-filter-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.filter-group { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 700; }
.filter-group select { padding: 8px 14px; font-size: 14px; border-radius: 6px; border: 1px solid #cbd5e1; background: white; }

.enc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.enc-card {
  background: white; border: 1px solid var(--village-line); border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s;
}
.enc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.enc-card-img-wrap { position: relative; background: var(--village-cream); }
.enc-card-img-wrap img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.enc-badge {
  position: absolute; right: 12px; top: 12px; color: white; padding: 4px 10px;
  font-size: 12px; font-weight: 700; border-radius: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.enc-card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.enc-card-body h3 { font-size: 19px; margin: 0 0 10px; }
.enc-meta { display: flex; gap: 15px; font-size: 13px; color: var(--village-muted); font-weight: 600; margin-bottom: 12px; }
.enc-card-body p { font-size: 14px; color: #475569; margin: 0 0 18px; flex: 1; line-height: 1.6; }

/* 카드 액션 버튼 (설명글 우선 연동) */
.enc-card-actions { display: flex; gap: 8px; margin-top: auto; }
.enc-guide-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 10px 12px; background: #ea580c; color: white !important; font-size: 13px; font-weight: 750;
  text-decoration: none; border-radius: 6px; transition: background 0.2s;
}
.enc-guide-btn:hover { background: #c2410c; }
.enc-log-sub-btn {
  padding: 10px 12px; background: #fff7ed; color: #ea580c !important; font-size: 12.5px; font-weight: 700;
  text-decoration: none; border-radius: 6px; border: 1px solid #fed7aa; white-space: nowrap; transition: all 0.2s;
}
.enc-log-sub-btn:hover { background: #fed7aa; }
.enc-log-btn {
  width: 100%; display: block; text-align: center; padding: 10px; background: #fff7ed; color: #ea580c !important;
  font-size: 13px; font-weight: 700; text-decoration: none; border-radius: 6px; border: 1px solid #fed7aa;
}
.enc-log-btn:hover { background: #ea580c; color: white !important; }

/* 게임 도우미 대형 쇼케이스 디자인 */
.helper-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  color: var(--village-ink);
  margin: 45px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--village-sand);
}
.helper-section-title .section-badge {
  font-size: 13px;
  background: var(--village-amber);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.helper-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 30px;
}
.helper-card-large {
  background: white;
  border: 1.5px solid var(--village-line);
  border-radius: 14px;
  padding: 26px 22px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.helper-card-large:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(234, 88, 12, 0.12);
  border-color: var(--village-amber);
}
.helper-card-large.highlight {
  border: 2px solid #fdba74 !important;
  background: linear-gradient(145deg, #ffffff 0%, #fff7ed 100%) !important;
}
.helper-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.helper-card-icon-box {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.helper-card-header h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--village-ink);
}
.helper-card-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 14px;
}
.helper-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.helper-card-bullets li {
  font-size: 13px;
  color: #475569;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.helper-card-bullets li::before {
  content: '✓';
  color: #ea580c;
  font-weight: 800;
}
.helper-card-btn {
  display: block;
  text-align: center;
  padding: 12px 18px;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  color: #ea580c;
  font-weight: 800;
  font-size: 15px;
  border-radius: 8px;
  transition: all 0.2s;
}
.helper-card-large:hover .helper-card-btn {
  background: #ea580c;
  color: white;
  border-color: #ea580c;
}

/* 홈 전용 게임 도우미 디렉토리 */
.tool-directory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tool-directory > a {
  padding: 20px; border: 1px solid var(--village-line); border-radius: 8px;
  text-decoration: none; background: white; transition: border-color 0.2s, box-shadow 0.2s; display: flex; flex-direction: column;
}
.tool-directory > a:hover {
  border-color: var(--village-amber); box-shadow: 0 6px 18px rgba(217, 119, 6, 0.12); transform: translateY(-2px);
}
.tool-card-highlight {
  border: 1.5px solid #fed7aa !important; background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%) !important;
}
.tool-badge-pill {
  align-self: flex-start; color: white; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 12px; margin-bottom: 10px;
}
.tool-directory strong { display: block; font-size: 16px; color: var(--village-ink); margin-bottom: 6px; }
.tool-directory span { display: block; font-size: 13px; color: var(--village-muted); line-height: 1.5; }

/* Interactive tool boxes */
.tool-box {
  background: var(--village-cream); border: 1px solid #ebdccb; border-radius: 8px;
  padding: 28px; margin: 25px 0; text-align: center;
}
.tool-btn {
  display: inline-block; padding: 12px 24px; background: var(--village-accent); color: white;
  border: 0; font-size: 16px; font-weight: 700; border-radius: 6px; cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.tool-btn:hover { background: #c2410c; transform: translateY(-1px); }
.tool-result {
  font-size: 28px; font-weight: 800; color: var(--village-ink); margin: 22px 0; min-height: 44px;
}

/* 티츄 전용 스코어보드 디자인 */
.tichu-team-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 720px; margin: 0 auto 25px;
}
.tichu-team-card {
  background: white; border: 2px solid var(--village-line); border-radius: 10px; padding: 20px; text-align: center;
}
.tichu-team-card.team-a { border-color: #3b82f6; }
.tichu-team-card.team-b { border-color: #ef4444; }
.tichu-team-name {
  font-size: 18px; font-weight: 800; border: 0; border-bottom: 2px solid #cbd5e1; text-align: center; width: 140px; padding: 4px;
}
.tichu-score-big {
  font-size: 48px; font-weight: 900; margin: 12px 0 6px;
}
.team-a .tichu-score-big { color: #2563eb; }
.team-b .tichu-score-big { color: #dc2626; }
.tichu-input-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; max-width: 720px; margin: 0 auto 20px; text-align: left;
}
.tichu-input-group { background: white; padding: 15px; border-radius: 8px; border: 1px solid #cbd5e1; }
.tichu-input-group label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.tichu-input-group select, .tichu-input-group input {
  width: 100%; padding: 8px 10px; font-size: 15px; border-radius: 6px; border: 1px solid #cbd5e1;
}

/* 야추 전용 디지털 점수판 */
.yacht-sheet-wrap {
  max-width: 680px; margin: 0 auto; background: white; border-radius: 10px; border: 1.5px solid var(--village-line); overflow: hidden;
}
.yacht-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.yacht-table th, .yacht-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; text-align: left; }
.yacht-table th { background: #f8fafc; font-weight: 750; }
.yacht-table td.yacht-score-cell { text-align: right; font-weight: 800; font-size: 16px; color: #ea580c; width: 120px; }
.yacht-table input[type="number"] {
  width: 80px; padding: 6px; text-align: right; font-size: 15px; font-weight: 700; border: 1px solid #cbd5e1; border-radius: 4px;
}
.yacht-bonus-row { background: #fff7ed !important; font-weight: 800; color: #9a3412; }
.yacht-total-bar {
  background: #172635; color: white; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 800;
}

/* 30종 미플 & 16칸 빙고 */
.meeple-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 25px; }
.meeple-card {
  background: white; border: 1px solid var(--village-line); border-radius: 8px; padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.meeple-emoji { font-size: 48px; line-height: 1; }
.meeple-header { display: flex; justify-content: space-between; align-items: baseline; }
.meeple-header h3 { font-size: 19px; margin: 0; }
.meeple-cond { font-size: 12px; color: var(--village-accent); font-weight: 800; background: #fff7ed; padding: 3px 8px; border-radius: 4px; }
.meeple-card p { font-size: 14px; color: var(--village-muted); margin: 0; line-height: 1.6; }

.bingo-board {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 640px; margin: 20px auto;
}
.bingo-cell {
  position: relative; aspect-ratio: 1/1; background: white; border: 2px solid var(--village-line);
  border-radius: 8px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 8px; text-align: center; user-select: none;
  transition: transform 0.15s, border-color 0.15s;
}
.bingo-cell img { width: 60%; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px; margin-bottom: 6px; }
.bingo-cell span { font-size: 12px; font-weight: 700; line-height: 1.2; }
.bingo-check {
  position: absolute; inset: 0; background: rgba(234, 88, 12, 0.85); color: white; font-size: 44px;
  font-weight: 900; display: none; align-items: center; justify-content: center;
}
.bingo-cell.active .bingo-check { display: flex; }
.bingo-score-bar {
  display: flex; justify-content: space-between; align-items: center; max-width: 640px; margin: auto;
  font-size: 16px; font-weight: 700;
}

/* Article pages */
main.article-page { max-width: 880px; }
.article-heading { border-bottom: 1px solid var(--village-line); padding-bottom: 22px; margin-bottom: 26px; }
.article-heading h1 { font-size: 34px; margin: 10px 0 16px; }
.article-question { font-size: 19px; line-height: 1.7; color: #334155; }
.byline { font-size: 13px; color: var(--village-muted); }
.article-lead-box {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center;
  margin: 30px 0; background: var(--village-cream); padding: 22px; border-radius: 8px; border: 1px solid #ebdccb;
}
.article-lead-box img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.article-body { font-size: 18px; line-height: 1.95; }
.article-body h2 {
  font-size: 26px; margin: 45px 0 20px; padding-top: 18px; border-top: 1px solid var(--village-line);
}
.article-body h3 { font-size: 21px; margin: 28px 0 14px; color: var(--village-wood); }
.article-body table {
  border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.7; min-width: 480px;
}
.article-body th, .article-body td {
  border: 1px solid #cbd5e1; padding: 12px 14px; text-align: left; vertical-align: top;
}
.article-body th { background: #f1f5f9; font-weight: 700; }
.table-scroll { overflow-x: auto; max-width: 100%; margin: 25px 0; border-radius: 6px; }
.app-inline-card {
  margin: 40px 0; padding: 24px; background: #fff7ed; border: 2px dashed #fb923c;
  border-radius: 8px; text-align: center;
}
.app-inline-card h3 { margin: 0 0 8px; color: #c2410c; }
.app-inline-card p { font-size: 15px; color: #9a3412; margin-bottom: 16px; }
.app-inline-card a {
  display: inline-block; padding: 12px 24px; background: #ea580c; color: white;
  text-decoration: none; font-weight: 700; border-radius: 6px; font-size: 15px;
}

/* Footer */
.site-footer {
  background: #f8fafc; color: var(--village-ink); border-top: 2px solid var(--village-ink);
  margin-top: 40px; font-size: 14px;
}
.footer-directory {
  max-width: 1280px; margin: auto; padding: 40px 24px; display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 25px;
}
.footer-directory h3 { font-size: 15px; margin: 0 0 16px; color: var(--village-wood); }
.footer-directory a { display: block; font-size: 13px; color: var(--village-muted); text-decoration: none; margin: 0 0 10px; }
.footer-directory a:hover { color: var(--village-accent); text-decoration: underline; }
.footer-bottom {
  max-width: 1232px; margin: auto; padding: 25px 0 35px; border-top: 1px solid var(--village-line);
}
.footer-bottom strong { font-size: 22px; }
.footer-bottom p { font-size: 13px; max-width: 900px; margin: 10px 0; color: var(--village-muted); }


/* Video Guide Card (YouTube External Callout) */
.video-guide-card {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
  border: 1.5px solid #fecaca; border-left: 5px solid #ef4444;
  border-radius: 10px; padding: 18px 22px; margin: 25px 0 35px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.08);
}
.video-guide-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.video-guide-info { flex: 1; }
.video-guide-info strong { display: block; font-size: 16px; color: #991b1b; margin-bottom: 4px; }
.video-guide-info p { font-size: 13.5px; color: #7f1d1d; margin: 0; line-height: 1.5; }
.video-guide-btn {
  flex-shrink: 0; background: #ef4444; color: white !important; font-size: 13.5px;
  font-weight: 750; padding: 10px 18px; border-radius: 6px; text-decoration: none;
  white-space: nowrap; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.video-guide-btn:hover { background: #dc2626; transform: translateY(-2px); }

/* Visual Diagram Card (SVG Infographics) */
.visual-diagram-card {
  background: var(--village-cream); border: 1.5px solid #ebdccb; border-radius: 10px;
  padding: 22px; margin: 30px 0; text-align: center;
}
.visual-diagram-header {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 800; color: var(--village-wood); margin-bottom: 16px;
}
.visual-diagram-content {
  background: white; border: 1px solid #cbd5e1; border-radius: 8px; padding: 16px;
  display: flex; justify-content: center; align-items: center; overflow-x: auto;
}
.visual-diagram-content svg { max-width: 100%; height: auto; }
.visual-diagram-caption {
  font-size: 13px; color: var(--village-muted); margin-top: 12px; line-height: 1.5;
}

/* Spec Grid */
.spec-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0 25px;
}
.spec-item {
  background: var(--village-cream); border: 1px solid #ebdccb; padding: 12px;
  border-radius: 8px; text-align: center;
}
.spec-item span { display: block; font-size: 12px; color: var(--village-muted); margin-bottom: 4px; }
.spec-item strong { display: block; font-size: 14.5px; color: var(--village-ink); }

/* Internal Related Box */
.internal-rel-box {
  background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: 22px; margin: 35px 0;
}
.internal-rel-box h4 {
  margin: 0 0 12px; font-size: 16px; color: var(--village-wood);
  display: flex; align-items: center; gap: 8px;
}
.internal-rel-links { display: flex; flex-wrap: wrap; gap: 10px; }
.internal-rel-links a {
  display: inline-flex; align-items: center; gap: 6px; background: white;
  border: 1px solid #cbd5e1; padding: 8px 14px; border-radius: 6px; font-size: 13.5px;
  font-weight: 650; color: var(--village-ink); text-decoration: none; transition: all 0.2s;
}
.internal-rel-links a:hover {
  border-color: var(--village-accent); color: var(--village-accent); background: #fff7ed;
}

/* FAQ Block */
.faq-block { margin: 35px 0; }
.faq-block h3 { margin: 0 0 16px; font-size: 20px; color: var(--village-wood); }
.faq-item {
  background: white; border: 1px solid var(--village-line); border-radius: 8px;
  padding: 16px 20px; margin-bottom: 12px;
}
.faq-question {
  font-weight: 800; font-size: 15.5px; color: var(--village-ink); margin-bottom: 8px;
  display: flex; align-items: flex-start; gap: 8px;
}
.faq-question .badge { color: var(--village-accent); font-weight: 900; }
.faq-answer {
  font-size: 14.5px; color: #475569; line-height: 1.7; margin: 0; padding-left: 24px;
}


/* Homepage Hero Intro Banner */
.hero-intro-banner {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 50%, #fafaf9 100%);
  border: 1.5px solid #fed7aa;
  border-radius: 14px;
  padding: 30px 32px;
  margin: 15px 0 35px;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.08);
}
.hero-intro-top {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.hero-bovill-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #f59e0b;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}
.hero-intro-text { flex: 1; }
.hero-badge {
  display: inline-block;
  background: #ea580c;
  color: white;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.hero-intro-text h1 {
  font-size: 26px;
  margin: 4px 0 10px;
  color: var(--village-ink);
  letter-spacing: -0.02em;
}
.hero-intro-text p {
  font-size: 14.5px;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}
.hero-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.hero-pillar-card {
  background: white;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 16px 14px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.hero-pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.12);
  border-color: #ea580c;
}
.hero-pillar-card.highlight {
  background: #fff7ed;
  border: 1.5px solid #fb923c;
}
.hero-pillar-card .p-icon {
  font-size: 24px;
  margin-bottom: 6px;
}
.hero-pillar-card strong {
  font-size: 14.5px;
  color: var(--village-ink);
  margin-bottom: 4px;
}
.hero-pillar-card span:last-child {
  font-size: 12px;
  color: var(--village-muted);
  line-height: 1.45;
}
@media (max-width: 900px) {
  .hero-pillars { grid-template-columns: repeat(2, 1fr); }
  .hero-intro-top { flex-direction: column; text-align: center; gap: 14px; }
}
@media (max-width: 600px) {
  .hero-pillars { grid-template-columns: 1fr; }
  .hero-intro-text h1 { font-size: 21px; }
  .hero-intro-banner { padding: 20px 16px; }
}

/* Responsive */
@media (max-width: 1000px) {
  .masthead-main { grid-template-columns: auto 1fr auto; }
  .header-search-wrap { order: 4; grid-column: 1 / -1; max-width: 100%; margin-top: 5px; }
  .home-top { grid-template-columns: 1fr; }
  .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mega-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meeple-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enc-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .video-guide-card { flex-direction: column; text-align: center; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .wordmark { font-size: 30px; }
  .brand-mascot span { display: none; }
  .brand-mascot img { width: 38px; height: 38px; }
  .search-modal-backdrop { padding: 20px 10px; }
  .stories { grid-template-columns: 1fr; }
  .feature-story > a { grid-template-columns: 1fr; }
  .tool-directory { grid-template-columns: 1fr; }
  .article-lead-box { grid-template-columns: 1fr; }
  .mega-columns { grid-template-columns: 1fr; }
  .footer-directory { grid-template-columns: 1fr; }
  .enc-grid { grid-template-columns: 1fr; }
  .meeple-grid { grid-template-columns: 1fr; }
  .enc-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bingo-board { gap: 6px; }
  .tichu-team-grid { grid-template-columns: 1fr; }
  .tichu-input-row { grid-template-columns: 1fr; }
}
