

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --septeni-red: #F60000;
  --septeni-blue: #0050AA;
  --septeni-black: #000000;
  --primary: #0050AA;
  --primary-dark: #003D82;
  --secondary: #000000;
  --accent: #F60000;
  --bg: #f5f5f5;
  --bg-white: #FFFFFF;
  --text: #1A1A1A;
  --text-light: #555555;
  --text-muted: #888888;
  --border: #E5E5E5;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --header-height: 72px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

@media (prefers-reduced-motion: reduce) {
  .hakase-promo, .hakase-promo::before, .hakase-promo::after,
  .jobs-promo, .jobs-promo::before, .jobs-promo::after { animation: none !important; }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 28px;
  width: auto;
}

@media (max-width: 768px) {
  .logo-img {
    height: 22px;
  }

}

br.sp-only { display: none; }
@media (max-width: 768px) {
  br.sp-only { display: inline; }
  br.pc-only { display: none; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
}

.header-service-links {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 100%;
}

.header-service-link {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  height: 100%;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50px;
  transition: all var(--transition);
  white-space: nowrap;
}

.header-service-link--newgrad {
  color: #fff;
  background: var(--septeni-red);
}

.header-service-link--newgrad:hover {
  background: #D50000;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(246, 0, 0, 0.3);
}

.header-service-link--career {
  color: #fff;
  background: var(--septeni-blue);
}

.header-service-link--career:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 80, 170, 0.3);
}

.header-service-link--jobs {
  color: #fff;
  background: var(--septeni-red);
}

.header-service-link--jobs:hover {
  background: #D50000;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(246, 0, 0, 0.3);
}

.section {
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.section > * {
  position: relative;
  z-index: 1;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: "";
  display: block;
  width: 4px;
  height: 28px;
  background: var(--septeni-red);
  border-radius: 2px;
}

.footer {
  background: #4a4a4a;
  color: rgba(255, 255, 255, 0.78);
  padding: 60px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: space-between;
  row-gap: 48px;
  margin-bottom: 48px;
  align-items: start;
  
  container-type: inline-size;
}

.footer-contents {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: flex-start;
}

@container (max-width: 469px) {
  .footer-contents { row-gap: 10px; }
}

.footer-contents__col {
  min-width: 150px;
}

.footer-links li {
  margin-bottom: 10px;
  break-inside: avoid;
}

.footer-links a {
  font-size: 13px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-links__top {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.footer-sublinks {
  list-style: none;
  margin: 8px 0 0 0;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-sublinks li {
  margin: 0 0 6px 0;
  break-inside: auto;
}

.footer-sublinks li:last-child {
  margin-bottom: 0;
}

.footer-sublinks a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-sublinks a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  font-size: 12px;
}

.footer-bottom-links a:hover {
  color: white;
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--septeni-blue);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 80, 170, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

@media (max-width: 1024px) {

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
  
  .footer-contents__col:nth-child(3) .footer-links li {
    margin-bottom: 4px;
  }
  .footer-contents__col:nth-child(3) .footer-links li:last-child {
    margin-bottom: 0;
  }
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0;
  flex-shrink: 0;
}
.menu-btn span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.menu-btn span:nth-child(1) { top: 12px; }
.menu-btn span:nth-child(2) { top: 19px; }
.menu-btn span:nth-child(3) { top: 26px; }
.menu-btn.active span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

site-header, site-footer { display: block; }

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}
.mobile-menu__nav {
  padding: 16px 20px 32px;
  display: flex;
  flex-direction: column;
}
.mobile-menu__item {
  padding: 18px 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu__item::after {
  content: "→";
  color: var(--text-muted);
  font-size: 14px;
}
.mobile-menu__divider {
  height: 16px;
}

.mobile-menu__services {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.mobile-menu__services .header-service-link {
  height: auto;
  padding: 14px 20px;
  font-size: 14px;
  justify-content: center;
  width: 100%;
}

@media (max-width: 1024px) {
  .menu-btn { display: block; }
}
@media (max-width: 768px) {
  .header-service-links { display: none; }
}

@media (max-width: 768px) {
  
  .hakase-promo__btns { align-items: stretch; }
  .hakase-promo__btn-group { align-items: stretch; }
  .hakase-promo__btn,
  .hakase-promo__btn-sub {
    text-align: center;
    justify-content: center;
  }

  .section { padding: 40px 0; }
  .section-title { font-size: 22px; }

  .category-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -20px 24px;
    padding: 0 20px;
  }
  .category-tabs::-webkit-scrollbar { display: none; }
  .category-tab { flex-shrink: 0; }

  .articles-grid { gap: 16px; }

  #pickupGrid,
  #recommendedGrid {
    display: flex;
    grid-template-columns: none;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    
    scroll-padding-left: 20px;
    gap: 12px;
    margin: 0 -20px;
    padding: 0 20px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #pickupGrid::-webkit-scrollbar,
  #recommendedGrid::-webkit-scrollbar {
    display: none;
  }
  #pickupGrid > *,
  #recommendedGrid > * {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }

  .back-to-top {
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .container { padding: 0 16px; }

  .footer-inner { gap: 24px; }
  .footer { padding: 32px 0 16px; }

  .article-header { padding: 24px 0; }
  .article-header__title { font-size: 22px; line-height: 1.5; }
  .article-content p { font-size: 15px; line-height: 1.9; }
  .article-content h2 { font-size: 18px; }
  .article-content h3 { font-size: 16px; }
  .article-toc { margin-bottom: 16px; }
  .article-toc__inner { padding: 16px; }

  .jobs-promo__title { font-size: 20px; }

}

@media (max-width: 768px) {
  .data-num { font-size: 32px; }
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.header-nav-link:hover {
  background: rgba(0, 80, 170, 0.08);
  color: var(--septeni-blue);
}
@media (max-width: 1024px) {
  .header-nav { display: none; }
}
