/* ===== カラー変数 ===== */
:root {
  --accent:      #FFD600;
  --accent-dark: #E6BE00;
  --dark:        #1A1A1A;
  --dark2:       #2C2C2C;
  --text:        #1A1A1A;
  --muted:       #666;
  --bg:          #F4F4F4;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', 'Meiryo', sans-serif; background: #fff; color: var(--text);   display: flex; flex-direction: column; min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; }
.container { max-width: 1100px; margin: 0 auto; }

/* ===== Header ===== */
header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid #ddd; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: #333; }
.logo-icon { width: 36px; height: 36px; background: var(--dark); border: 2px solid var(--accent); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 20px; font-weight: 900; }
.logo-img { height: 64px; width: auto; display: block; }
.header-right { display: flex; align-items: center; gap: 12px; }

/* ===== Language Switcher ===== */
.lang-switcher { display: flex; border: 1px solid #ccc; border-radius: 20px; overflow: hidden; }
.lang-btn { padding: 4px 12px; border: none; background: #fff; cursor: pointer; font-size: 12px; font-weight: 600; color: #888; transition: background 0.2s, color 0.2s; }
.lang-btn.active { background: var(--dark); color: var(--accent); }
.lang-btn:hover:not(.active) { background: #f0f0f0; }

/* ===== Hamburger ===== */
.hamburger { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #333; border-radius: 2px; }

/* ===== Main ===== */
main { background: #fff;   flex: 1 0 auto;
}
.page-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px 56px; }

/* ===== Breadcrumb ===== */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; font-size: 12px; color: var(--muted); padding: 12px 0 8px; }
.breadcrumb ol li + li::before { content: '›'; margin-right: 8px; }
.breadcrumb ol li a { color: var(--muted); text-decoration: underline; }
.breadcrumb ol li a:hover { color: var(--dark); }

/* ===== Page Heading ===== */
.page-heading { font-size: 22px; font-weight: 900; margin: 4px 0 8px; padding-left: 12px; border-left: 4px solid var(--accent); }
.page-desc { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

/* ===== Tab Bar ===== */
.tab-bar {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 20px;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #aaa;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-btn:hover:not(.active) { color: #555; }

/* ===== Article Grid ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  min-height: 160px;
}

/* ===== List Card ===== */
.list-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ebebeb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.15s;
}
.list-card:hover { box-shadow: 0 5px 16px rgba(0,0,0,0.12); transform: translateY(-2px); }
.list-card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.list-card-body { padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.list-card-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--dark);
  background: var(--accent);
  padding: 2px 7px;
  border-radius: 3px;
  align-self: flex-start;
  letter-spacing: 0.03em;
}
.list-card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Empty State ===== */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 56px 0; color: var(--muted); font-size: 14px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.page-btn:hover:not(.active):not(:disabled) { background: #f5f5f5; }
.page-btn.active { background: var(--dark); border-color: var(--dark); color: var(--accent); font-weight: 900; }
.page-btn:disabled { opacity: 0.35; cursor: default; }
.page-ellipsis { color: #bbb; font-size: 16px; line-height: 38px; letter-spacing: 2px; padding: 0 2px; }

/* ===== Footer ===== */
footer { background: #2c2c2c; color: #ccc; }
.footer-inner { padding: 32px 16px 16px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.footer-logo .logo-icon { background: var(--dark); border-color: var(--accent); }
.footer-logo span { color: #fff; font-weight: 700; font-size: 16px; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 24px; }
.footer-col h3 { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col ul { list-style: none; }
.footer-col ul li + li { margin-top: 6px; }
.footer-col ul li a { color: #aaa; font-size: 13px; transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #444; padding-top: 16px; text-align: center; font-size: 12px; color: #666; }

/* ===== Menu Drawer ===== */
.menu-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 150; }
.menu-backdrop.open { display: block; }
.menu-drawer { position: fixed; top: 0; right: -320px; width: 300px; height: 100%; background: #fff; z-index: 200; box-shadow: -4px 0 20px rgba(0,0,0,0.15); transition: right 0.3s ease; display: flex; flex-direction: column; }
.menu-drawer.open { right: 0; }
.menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #eee; }
.menu-header span { font-weight: 700; font-size: 16px; }
.menu-close { background: none; border: none; cursor: pointer; font-size: 22px; color: #666; line-height: 1; }
.menu-body { padding: 8px 0; flex: 1; overflow-y: auto; }
.menu-cat-item { border-bottom: 1px solid #f0f0f0; }
.menu-cat-header { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: none; border: none; cursor: pointer; text-align: left; transition: background 0.15s; }
.menu-cat-header:hover { background: #f8f8f8; }
.menu-cat-icon { width: 36px; height: 36px; background: var(--dark); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.menu-cat-icon svg { width: 20px; height: 20px; }
.menu-cat-label { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.menu-cat-badge { font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: 0.05em; }
.menu-cat-name { font-size: 15px; font-weight: 700; color: #333; }
.menu-cat-arrow { font-size: 14px; color: #aaa; transition: transform 0.25s; flex-shrink: 0; }
.menu-cat-header[aria-expanded="true"] .menu-cat-arrow { transform: rotate(-180deg); }
.menu-sub-list { list-style: none; overflow: hidden; max-height: 400px; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 16px 10px 62px; background: #fafafa; }
.menu-sub-list.closed { max-height: 0; padding-top: 0; padding-bottom: 0; }
.menu-sub-list li + li { margin-top: 2px; }
.menu-sub-list li a { display: block; padding: 8px 0; font-size: 14px; color: #555; border-bottom: 1px solid #eee; transition: color 0.2s; }
.menu-sub-list li:last-child a { border-bottom: none; }
.menu-sub-list li a:hover { color: var(--dark); font-weight: 600; }

/* ===== PC (768px+) ===== */
@media (min-width: 768px) {
  .header-inner { padding: 6px 24px; }
  .logo { font-size: 20px; }
  .page-inner { padding: 0 24px 64px; }
  .article-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .list-card-title { font-size: 14px; }
  .list-card-desc { font-size: 12px; }
  .footer-inner { padding: 40px 24px 20px; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; }
}
