body {
  margin: 0;
  font-family: "Meiryo", sans-serif;
  line-height: 1.6;
  color: #222;
  text-align: justify;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;

}

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

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 15px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: url('symbolmark.png') center/contain no-repeat;
  flex-shrink: 0;
}

.brand-sub {
  font-size: 12px;
  color: #666;
}

.brand-main {
  font-weight: bold;
  font-size: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-link:visited,
.brand-link:hover {
  color: inherit;
}

nav a {
  margin-right: 20px;
  text-decoration: none;
  color: #333;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  margin-left: 20px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
}

.nav .cta {
  background: #11a36a;
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
}

/* ヒーロー */
.hero {
  height: 70vh;
  min-height: 420px;
  background: url('top_image.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  color: white;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.hero-inner {
  position: relative;
  margin-left: 80px;
  z-index: 1;
}

h1 {
  font-size: 48px;
  margin: 0;
  line-height: 1.25;
}

.hero-course {
  font-size: 24px;
  margin-top: 20px;
  line-height: 1.8;
}

.hero-course h2 {
  margin: 12px 0 0;
  font-size: 32px;
  line-height: 1.4;
}

.hero-cours2 {
  font-size: 30px;
  margin-top: 20px;
}

.hero-en {
  font-size: 18px;
}

.button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background: #11a36a;
  color: white;
  border-radius: 6px;
  text-decoration: none;
}

/* セクション */
.section {
  padding: 30px 0;
}

.gray {
  background: #f5f5f5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-sizing: border-box;
}

/* 研究分野キャッチ */
.catch {
  font-size: 14px;
  color: #11a36a;
  margin: 8px 0 12px;
  text-align: center;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.research-card {
  text-align: left;
}

.research-icon {
  display: block;
  width: 120px;
  height: auto;
  margin: 20px auto 0;
}

.quantum-figure {
  display: block;
  width: 540px;
  height: auto;
  margin: 10px auto 0;
}

.research-card:nth-child(1) {
  background: #e6f0ff;
}

.research-card:nth-child(2) {
  background: #e6fff3;
}

.research-card:nth-child(3) {
  background: #fff3e6;
}

.research-card:nth-child(4) {
  background: #f0f0f0;
}

/* イントロセクション */
.intro-inner {
  display: flex;
  gap: 40px;
  align-items: center;
}

.intro-text {
  flex: 1;
}

.intro-slider {
  flex: 1;
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 10px;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

/* 学べる内容 */
.learn-section {
  padding: 80px 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.learn-section .container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #2b6cb0;
}

.section-header h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #1a365d;
  line-height: 1.3;
}

.section-lead {
  margin: 0 auto;
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #44546a;
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.learn-card {
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px solid #c9d8ea;
  background: #ffffff;
  box-sizing: border-box;
}

.learn-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.learn-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
}

.learn-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.learn-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* 学べる内容：図とカード */
.study-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 30px;
}

.study-figure {
  background: white;
  border-radius: 12px;
  padding: 16px;
}

.study-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.study-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.study-fields .card {
  background: white;
  padding: 14px 16px;
  border-radius: 10px;
}

.study-fields .card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.study-fields .card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}

/* 横並びカード */
.study-fields-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.study-fields-row .card {
  background: white;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
}

.study-icon {
  width: 140px;
  padding: 2px;
  background: #07ed0b;
  border-radius: 2px;
  margin: 0 auto 5px;
}

/* 図（下） */
.study-figure-bottom {
  margin-top: 40px;
  background: white;
  padding: 20px;
  border-radius: 12px;
}

.study-figure-bottom img {
  width: 70%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* NEWS */
.news div {
  margin-bottom: 10px;
}

.news-year {
  margin-top: 40px;
  margin-bottom: 5px;
  font-size: 22px;
  border-left: 4px solid #0a49c4;
  padding-left: 10px;
}

.news-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.news-item {
  margin-top: 10px;
  margin-bottom: 10px;
  /*border-bottom: 10px solid #e5e5e5; */
}

.news-item:last-child {
  border-bottom: none;
}

.news-link {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.news-link:hover {
  background: #f8fbff;
}

.news-date {
  color: #000000;
  font-weight: 700;
  white-space: nowrap;
}

.news-title {
  color: #222;
}

.news-more {
  margin-top: 18px;
  text-align: right;
}

/* リンク */
.link-arrow {
  color: #0a49c4;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}

.link-arrow:hover {
  text-decoration: underline;
}

/* お問い合わせ */
.contact-box {
  background: #f7f9fc;
  padding: 24px 28px;
  border-radius: 12px;
  margin-top: 20px;
  line-height: 1.8;
}

.contact-mail {
  color: #0a49c4;
  text-decoration: none;
}

.contact-mail:hover {
  text-decoration: underline;
}

/* 教員グリッド */
.lab-group {
  margin-bottom: 40px;
  padding: 22px 20px 24px;
  border-radius: 18px;
}

.lab-title {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 5px solid #0a49c4;
  font-size: 22px;
  line-height: 1.5;
}

.lab-title a {
  color: inherit;
  text-decoration: none;
}

.lab-title a:hover {
  text-decoration: underline;
}

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.faculty-card {
  background: #ffffff;
  padding: 20px 18px;
  border-radius: 12px;
  text-align: center;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  height: 100%;
}

.faculty-card>img,
.faculty-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 12px;
}

.faculty-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.4;
}

.faculty-title {
  font-size: 14px;
  color: #777;
  margin: 4px 0 8px;
}

.faculty-field {
  font-size: 13px;
  color: #118a62;
  margin: 0 0 10px;
  line-height: 1.6;
}

.faculty-desc {
  font-size: 13px;
  line-height: 1.75;
  margin: 10px 0 14px;
  text-align: left;
}

.faculty-card .link-arrow {
  display: inline-block;
  margin-top: 4px;
}

/* 研究室ごとの背景色 */
.lab-theme-blue {
  background: #eef5ff;
}

.lab-theme-cyan {
  background: #eefafb;
}

.lab-theme-purple {
  background: #f4f0ff;
}

.lab-theme-pink {
  background: #eef4f8;
}

.lab-theme-green {
  background: #eefaf1;
}

.lab-theme-orange {
  background: #fff5eb;
}

.lab-theme-teal {
  background: #eefaf8;
}

.lab-theme-sand {
  background: #faf6ee;
}

.lab-theme-slate {
  background: #f2f5f8;
}

.lab-theme-lilac {
  background: #f5f1fb;
}

.lab-theme-gold {
  background: #fff9e8;
}

/* 研究室ごとの見出しアクセント */
.lab-theme-blue .lab-title {
  border-left-color: #2f6fe4;
}

.lab-theme-cyan .lab-title {
  border-left-color: #1aa7b8;
}

.lab-theme-purple .lab-title {
  border-left-color: #7b61d1;
}

.lab-theme-pink .lab-title {
  border-left-color: #5f7f96;
}

.lab-theme-green .lab-title {
  border-left-color: #2e9d57;
}

.lab-theme-orange .lab-title {
  border-left-color: #d9822b;
}

.lab-theme-teal .lab-title {
  border-left-color: #1e8f86;
}

.lab-theme-sand .lab-title {
  border-left-color: #b78b52;
}

.lab-theme-slate .lab-title {
  border-left-color: #60758a;
}

.lab-theme-lilac .lab-title {
  border-left-color: #8b6ccf;
}

.lab-theme-gold .lab-title {
  border-left-color: #c89b1f;
}

/* タブレット */
@media (max-width: 1024px) {
  .faculty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* スマホ */
@media (max-width: 768px) {
  .section {
    padding: 28px 0;
  }

  .lab-group {
    margin-bottom: 28px;
    padding: 16px 14px 18px;
    border-radius: 14px;
  }

  .lab-title {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .faculty-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 6px;
  }

  .faculty-card {
    padding: 16px 14px;
    border-radius: 10px;
  }

  .faculty-card>img,
  .faculty-photo {
    width: 96px;
    height: 96px;
    margin-bottom: 10px;
  }

  .faculty-card h3 {
    font-size: 18px;
  }

  .faculty-title,
  .faculty-field,
  .faculty-desc {
    font-size: 14px;
  }

  .faculty-desc {
    line-height: 1.7;
  }
}

/* フッター */
footer {
  padding: 30px;
  background: #222;
  color: white;
}

/* 上に戻る */
#toTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #11a36a;
  color: white;
  border: none;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  cursor: pointer;
  z-index: 200;
}

#toTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* タブレット */
@media (max-width: 1024px) {
  .learn-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    margin-left: 40px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-course h2 {
    font-size: 28px;
  }
}

/* スマホ */
@media (max-width: 768px) {
  .container {
    width: 92%;
  }

  .section {
    padding: 32px 0;
  }

  .site-header {
    padding: 10px 0;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-sub {
    font-size: 11px;
  }

  .brand-main {
    font-size: 16px;
  }

  .nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .nav a {
    margin: 0;
    font-size: 14px;
  }

  .hero {
    height: 58vh;
    min-height: 420px;
    padding: 0 20px;
    background-position: center;
  }

  .hero-inner {
    margin-left: 0;
  }

  h1 {
    font-size: 32px;
    line-height: 1.3;
  }

  .hero-course {
    font-size: 18px;
    margin-top: 14px;
    line-height: 1.7;
  }

  .hero-course h2 {
    font-size: 24px;
    line-height: 1.4;
    margin-top: 8px;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .research-card {
    padding: 18px 16px;
  }

  .research-icon {
    width: 100px;
  }

  .intro-inner {
    flex-direction: column;
    gap: 24px;
  }

  .intro-slider {
    width: 100%;
    height: 220px;
  }

  .study-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .study-fields-row {
    grid-template-columns: 1fr;
  }

  .study-figure-bottom img {
    width: 100%;
  }

  .news-link {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 16px;
  }

  .contact-box {
    padding: 18px 16px;
    font-size: 14px;
  }

  .faculty-grid {
    grid-template-columns: 1fr;
  }

  #toTop {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

/* 小さめスマホ */
@media (max-width: 640px) {
  .learn-section {
    padding: 64px 16px;
  }

  .learn-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .learn-card {
    padding: 22px 18px;
  }

  .learn-card h3 {
    font-size: 1rem;
  }

  .learn-card p {
    font-size: 0.9rem;
  }
}

/* quantum.html 専用 */
.quantum-page {
  padding-top: 56px;
  padding-bottom: 56px;
}

.page-title {
  margin: 0 0 32px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.5;
  color: #1a365d;
}

.quantum-intro {
  align-items: flex-start;
}

.quantum-intro .intro-text {
  flex: 1.1;
}

.quantum-intro .intro-text p {
  font-size: 1rem;
  line-height: 2;
  color: #333;
}

.quantum-visual {
  flex: 0.9;
  height: auto;
  min-height: auto;
  overflow: visible;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-sizing: border-box;
}

.quantum-figure {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* タブレット */
@media (max-width: 1024px) {
  .quantum-page {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .page-title {
    margin-bottom: 24px;
  }

  .quantum-figure {
    max-width: 440px;
  }
}

/* スマホ */
@media (max-width: 768px) {
  .quantum-page {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .page-title {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .quantum-intro {
    flex-direction: column;
    gap: 20px;
  }

  .quantum-intro .intro-text p {
    font-size: 0.95rem;
    line-height: 1.9;
  }

  .quantum-visual {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
  }

  .quantum-figure {
    width: 100%;
    max-width: 100%;
  }
}

/* 小さめスマホ */
@media (max-width: 480px) {
  .page-title {
    font-size: 1.3rem;
  }

  .quantum-intro .intro-text p {
    font-size: 0.92rem;
    line-height: 1.85;
  }
}

:root {
  --header-height: 50px;
}

@media (max-width: 768px) {
  :root {
    --header-height: 40px;
  }
}

section {
  scroll-margin-top: var(--header-height);
}

.quantum-visual {
  text-align: center;
  margin-bottom: 30px;
}

.quantum-figure {
  width: 90%;
  max-width: 900px;
  /* 大きくしすぎ防止 */
  height: auto;
}

.career-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 40px;
}

.career-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.career-card:hover {
  transform: translateY(-5px);
}

.career-card h3 {
  color: #0b3d91;
  margin-bottom: 10px;
}

.career-card ul {
  padding-left: 18px;
  font-size: 14px;
}

.message {
  text-align: center;
  padding: 40px 20px;
  background: #e9f0fb;
}

.message h2 {
  color: #0b3d91;
}

.contact {
  padding: 50px 20px;
  background: #f5f7fa;
}

.contact-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
  gap: 30px;
}

.contact-text {
  flex: 1;
}

.contact-image {
  flex: 1;
}

.contact-image img {
  width: 100%;
  border-radius: 15px;
  object-fit: cover;
}

/* お問い合わせ・進路ページのスマホ最適化 */
@media (max-width: 768px) {
  .contact-container {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .contact-text,
  .contact-image {
    width: 100%;
  }

  .contact-image img {
    display: block;
    width: 100%;
    height: auto;
  }

  .career-grid {
    padding: 20px 16px;
  }

  .career-card {
    padding: 16px;
  }

  .career-card h3 {
    font-size: 18px;
    line-height: 1.4;
  }

  .career-card p,
  .career-card li {
    font-size: 14px;
    line-height: 1.7;
  }
}

@media (max-width: 480px) {
  .career-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 12px;
  }

  .career-card {
    border-radius: 12px;
    padding: 14px;
  }
}

section {
  scroll-margin-top: 80px;
}

.lab-image {
  text-align: center;
}

.lab-image img {
  max-width: 720px;
  width: 100%;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .lab-image img {
    border-radius: 10px;
  }
}