/* ===== Variables ===== */
:root {
  --accent: #FFD600;
  --dark:   #1A1A1A;
  --dark2:  #2C2C2C;
  --bg:     #ffffff;
  --muted:  #888;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', 'Meiryo', sans-serif; background: var(--bg); color: var(--dark);   display: flex; flex-direction: column; min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { display: block; }

.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; }
.logo-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  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; }
.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 .2s, color .2s; }
.lang-btn.active { background: var(--dark); color: var(--accent); }
.lang-btn:hover:not(.active) { background: #f0f0f0; }
.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; }

/* ===== Drawer ===== */
.menu-backdrop { display: none; position: fixed; inset: 0; background: rgba(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,.15);
  transition: right .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; }
.menu-body { padding: 20px 16px; flex: 1; overflow-y: auto; color: #999; font-size: 14px; }

/* ===== Main ===== */
main { background: var(--bg);   flex: 1 0 auto;
}
.page-inner { padding: 20px 16px; max-width: 1100px; margin: 0 auto; }

/* ===== Page Heading ===== */
.page-heading {
  margin-bottom: 20px;
}
.page-heading h1 {
  font-size: 20px;
  font-weight: 900;
  color: var(--dark);
}
.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ===== Section heading ===== */
.section-title-link {
  display: flex;
  text-decoration: none;
  color: inherit;
}
.section-title {
  flex: 1;
  font-size: 17px; font-weight: 700;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.section-more {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

/* ===== Card Slider ===== */
.slider-section { margin-bottom: 32px; }

.slider-outer {
  overflow: hidden;
  margin: 0 -16px;
}
.slider-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 16px;
  -webkit-overflow-scrolling: touch;
  padding: 6px 16px 14px;
  scrollbar-width: none;
  cursor: grab;
}
.slider-track:active { cursor: grabbing; }
.slider-track::-webkit-scrollbar { display: none; }

/* ===== Card ===== */
.card {
  flex: 0 0 calc(100% / 2.5);
  scroll-snap-align: start;
  min-width: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.09);
  user-select: none;
  transition: transform .15s, box-shadow .15s;
  display: block;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.13); }
.card:active { transform: scale(0.98); }
.card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 8px 10px 12px;
}
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Back link ===== */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; margin-bottom: 20px;
  background: var(--dark); color: var(--accent);
  font-size: 13px; font-weight: 700; border-radius: 6px;
  transition: opacity .2s;
}
.back-btn:hover { opacity: .8; }

/* ===== Footer ===== */
footer { background: #2c2c2c; color: #ccc; margin-top: 8px; }
.footer-inner { padding: 32px 16px 16px; max-width: 1100px; margin: 0 auto; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.footer-logo .logo-icon { background: var(--dark); border: 2px solid 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; }
.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 .2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #444; padding-top: 14px; text-align: center; font-size: 12px; color: #666; }

/* ===== Article Grid (2列) ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.article-grid .card {
  flex: none;
  width: 100%;
}

@media (min-width: 768px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* ===== Page Banner ===== */
.page-banner {
  width: 100%;
  overflow: hidden;
  margin-bottom: 0;
}
.page-banner img {
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  object-position: center top;
  display: block;
}

@media (min-width: 768px) {
  .page-banner img {
    aspect-ratio: 16 / 5;
  }
}

/* ===== Article ===== */
.article-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
}
.article-title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 28px;
  color: var(--dark);
}
.article-section {
  margin-bottom: 36px;
}
.article-section h2 {
  font-size: 16px;
  font-weight: 800;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  margin-bottom: 12px;
  line-height: 1.4;
}
.article-section p {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
}
.article-section ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-section ol li {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  margin-bottom: 20px;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb ol li + li::before {
  content: '›';
  margin-right: 4px;
}
.breadcrumb ol li a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.breadcrumb ol li a:hover { color: var(--dark); }
.breadcrumb ol li[aria-current] { color: var(--dark); font-weight: 600; }

/* ===== Menu Category Accordion ===== */
.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 .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; }
.menu-cat-name { font-size: 15px; font-weight: 700; color: #333; }
.menu-cat-arrow { font-size: 14px; color: #aaa; transition: transform .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 .3s ease, padding .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 .2s;
}
.menu-sub-list li:last-child a { border-bottom: none; }
.menu-sub-list li a:hover { color: var(--dark); font-weight: 600; }
.menu-body { padding: 8px 0; }

/* ===== PC ===== */
@media (min-width: 768px) {
  .header-inner { padding: 6px 24px; }
  .logo { font-size: 20px; }
  .page-inner { padding: 28px 24px; }
  .slider-outer { margin: 0 -24px; }
  .slider-track { padding: 6px 24px 14px; gap: 14px; scroll-padding-left: 24px; }
  .card { flex: 0 0 calc(100% / 3.5); }
  .footer-inner { padding: 40px 24px 20px; }
  .footer-grid { grid-template-columns: repeat(4,1fr); gap: 32px; }
  .page-heading h1 { font-size: 24px; }
  .article-title { font-size: 28px; }
  .article-section h2 { font-size: 18px; }
  .article-section p,
  .article-section ol li { font-size: 15px; }
}
