@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700;900&family=Noto+Serif+JP:wght@400;500;600;700&display=swap");

:root {
  --navy: #0f1c2e;
  --navy-light: #1a2d47;
  --navy-dark: #0a1220;
  --gold: #b8860b;
  --gold-light: #d4a845;
  --gold-pale: #f5e6c8;
  --blue: #2563eb;
  --blue-pale: #eff6ff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-light: #718096;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

header.header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%) !important;
  border-bottom: 3px solid var(--gold) !important;
  box-shadow: var(--shadow-md) !important;
}

.site-branding__name a {
  color: #fff !important;
  font-family: "Noto Serif JP", serif !important;
  font-weight: 700 !important;
  font-size: 1.6rem !important;
  letter-spacing: 0.08em !important;
  text-decoration: none !important;
}

.primary-nav__menu-link,
.menu-item a {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 500 !important;
}

.primary-nav__menu-link:hover,
.menu-item a:hover {
  color: var(--gold-light) !important;
}

h1.page-title,
.page-title {
  font-family: "Noto Serif JP", serif !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  font-size: 1.8rem !important;
  padding-bottom: 0.8rem !important;
  border-bottom: 3px solid var(--gold) !important;
}

h1 span.field--name-title {
  font-family: "Noto Serif JP", serif !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
}

.node__meta {
  display: none !important;
}

.teaser__meta {
  display: none !important;
}

.view-frontpage .view-content,
.view-id-frontpage .view-content,
.path-frontpage .view-content {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
  padding: 1rem 0 !important;
}

article.node--view-mode-teaser,
article.teaser {
  background: var(--bg-white) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden !important;
  transition: all 0.25s ease !important;
  box-shadow: var(--shadow-sm) !important;
}

article.node--view-mode-teaser:hover,
article.teaser:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-hover) !important;
  border-color: var(--gold-light) !important;
}

article.node--view-mode-teaser::before,
article.teaser::before {
  content: "" !important;
  display: block !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--navy), var(--gold), var(--navy)) !important;
}

.teaser__content {
  padding: 1.2rem 1.5rem 1.5rem !important;
}

.teaser__title a,
.node__title a,
article.teaser h2 a {
  font-family: "Noto Serif JP", serif !important;
  font-weight: 600 !important;
  color: var(--navy) !important;
  font-size: 1.15rem !important;
  text-decoration: none !important;
}

.teaser__title a:hover,
.node__title a:hover {
  color: var(--gold) !important;
}

article.teaser .field--name-body,
.teaser__content .field--name-body {
  font-size: 0.88rem !important;
  color: var(--text-secondary) !important;
  margin-top: 0.6rem !important;
}

.school-lead-text {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--gold);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.9;
  box-shadow: var(--shadow-md);
}

.school-header-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.school-header-card h3 {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 0.8rem 1.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.school-header-card th {
  background: var(--bg-light);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  text-align: left;
  width: 160px;
  border-bottom: 1px solid var(--border-light);
}

.school-header-card td {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
}

.badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-prefecture {
  background: var(--blue-pale);
  color: var(--blue);
}

.badge-type {
  background: #fef3c7;
  color: #92400e;
}

.badge-gender-male {
  background: #dbeafe;
  color: #1e40af;
}

.badge-gender-female {
  background: #fce7f3;
  color: #9d174d;
}

.badge-gender-coed {
  background: #d1fae5;
  color: #065f46;
}

.school-exam-section > h2,
.school-results-section > h2 {
  font-family: "Noto Serif JP", serif;
  font-weight: 600;
  color: var(--navy);
  font-size: 1.3rem;
  padding: 0.6rem 0 0.6rem 1rem;
  border-left: 4px solid var(--gold);
  margin: 2.5rem 0 1.2rem;
  background: linear-gradient(90deg, var(--bg-light), transparent);
}

.school-exam-section h3,
.school-results-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-light);
  margin: 1.5rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--gold-pale);
}

.school-exam-section table,
.school-results-section table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.school-exam-section thead th,
.school-results-section thead th {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.7rem 0.8rem;
  text-align: center;
}

.school-exam-section tbody td,
.school-results-section tbody td {
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-white);
}

.school-exam-section tbody tr:nth-child(even) td,
.school-results-section tbody tr:nth-child(even) td {
  background: var(--bg-light);
}

.school-exam-section tbody tr:hover td,
.school-results-section tbody tr:hover td {
  background: var(--blue-pale);
}

.school-map-section iframe {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md);
}

.node--type-school.node--view-mode-full .field--name-body {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--gold);
  margin-bottom: 2rem;
  line-height: 1.9;
  box-shadow: var(--shadow-md);
}

table.views-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

table.views-table thead th {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.8rem 1rem;
}

table.views-table tbody td {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-white);
}

table.views-table tbody tr:nth-child(even) td {
  background: var(--bg-light);
}

table.views-table tbody tr:hover td {
  background: var(--blue-pale);
}

table.views-table tbody td a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}

table.views-table tbody td a:hover {
  color: var(--gold);
}

.views-exposed-form {
  background: var(--bg-white);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.views-exposed-form input[type="submit"] {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
}

.site-footer {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%) !important;
  color: rgba(255,255,255,0.8) !important;
  border-top: 3px solid var(--gold) !important;
}

.site-footer a {
  color: var(--gold-light) !important;
  text-decoration: none !important;
}

.layout-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .path-frontpage .view-content {
    grid-template-columns: 1fr !important;
  }
  .school-header-card th {
    width: 100px;
    font-size: 0.8rem;
  }
  h1.page-title, .page-title {
    font-size: 1.4rem !important;
  }
  .school-lead-text {
    padding: 1rem 1.2rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 480px) {
  .school-exam-section thead th,
  .school-results-section thead th {
    padding: 0.5rem 0.4rem;
    font-size: 0.75rem;
  }
  .school-exam-section tbody td,
  .school-results-section tbody td {
    padding: 0.4rem;
    font-size: 0.8rem;
  }
}

.teaser__title,
article.teaser h2,
article.node--view-mode-teaser h2 {
  text-align: center !important;
  padding: 1rem 1.5rem 0.5rem !important;
}
.teaser__title a,
article.teaser h2 a,
article.node--view-mode-teaser h2 a {
  display: block !important;
  text-align: center !important;
}
article.node--view-mode-teaser,
article.teaser {
  max-width: 700px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.path-frontpage .view-content {
  grid-template-columns: 1fr !important;
}

/* === LAYOUT FIX: Align widths === */
.path-frontpage .block__content,
.path-frontpage .text-content {
  max-width: 100%;
}
.path-frontpage .view-content {
  max-width: 100%;
  width: 100%;
}
article.node--view-mode-teaser,
article.teaser {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}
/* Tighten card spacing */
.teaser__content {
  padding: 0.8rem 1.2rem 1rem;
}
.teaser__title a,
.node__title a,
article.teaser h2 a {
  font-size: 1.05rem;
  padding: 0.6rem 1rem 0.3rem;
}
.teaser__title,
article.teaser h2,
article.node--view-mode-teaser h2 {
  padding: 0.6rem 1rem 0.3rem;
}
article.teaser .field--name-body,
.teaser__content .field--name-body {
  font-size: 0.82rem;
  line-height: 1.6;
}
/* Reduce grid gap */
.path-frontpage .view-content {
  gap: 1rem;
  padding: 0.5rem 0;
}
/* Ad label */
.ad-banner::after {
  content: "PR";
  display: block;
  text-align: right;
  font-size: 0.6rem;
  color: #999;
  margin-top: 0.15rem;
}

/* === MENU VISIBILITY FIX === */
.primary-nav__menu-link,
.primary-nav__menu-link:visited,
.primary-nav__menu-link--link,
nav.primary-nav a,
.menu--main a,
header a.primary-nav__menu-link {
  color: #ffffff !important;
  opacity: 1 !important;
}
.primary-nav__menu-link:hover,
nav.primary-nav a:hover,
.menu--main a:hover {
  color: #d4a845 !important;
}
.primary-nav__menu-link--active-trail,
.primary-nav__menu-link.is-active {
  color: #d4a845 !important;
}
/* Hamburger icon color */
.primary-nav__button-toggle,
.mobile-nav-button {
  color: #fff !important;
}
/* Secondary nav (login etc) */
.secondary-nav__menu-link,
header .secondary-nav a {
  color: rgba(255,255,255,0.85) !important;
}

/* === MENU VISIBILITY FIX === */
.primary-nav__menu-link,
.primary-nav__menu-link:visited,
.primary-nav__menu-link--link,
nav.primary-nav a,
.menu--main a,
header a.primary-nav__menu-link {
  color: #ffffff !important;
  opacity: 1 !important;
}
.primary-nav__menu-link:hover,
nav.primary-nav a:hover,
.menu--main a:hover {
  color: #d4a845 !important;
}
.primary-nav__menu-link--active-trail,
.primary-nav__menu-link.is-active {
  color: #d4a845 !important;
}
/* Hamburger icon color */
.primary-nav__button-toggle,
.mobile-nav-button {
  color: #fff !important;
}
/* Secondary nav (login etc) */
.secondary-nav__menu-link,
header .secondary-nav a {
  color: rgba(255,255,255,0.85) !important;
}

/* === HEADER BACKGROUND FIX (Olivero uses .site-header) === */
header.site-header,
.site-header,
.site-header__fixable,
.site-header__fixable.is-expanded {
  background: linear-gradient(135deg, #0f1c2e 0%, #1a2d47 100%) !important;
  border-bottom: 3px solid #b8860b !important;
}
.site-header__initial {
  background: #0f1c2e !important;
}

/* === HEADER BACKGROUND FIX (Olivero uses .site-header) === */
header.site-header,
.site-header,
.site-header__fixable,
.site-header__fixable.is-expanded {
  background: linear-gradient(135deg, #0f1c2e 0%, #1a2d47 100%) !important;
  border-bottom: 3px solid #b8860b !important;
}
.site-header__initial {
  background: #0f1c2e !important;
}

/* HEADER BG - target Olivero inner container */
header.site-header,
.site-header,
.site-header__fixable,
.site-header__fixable.is-expanded,
.site-header__inner,
.site-header__inner__container,
body.is-fixed .site-header__inner__container {
  background: linear-gradient(135deg, #0f1c2e 0%, #1a2d47 100%) !important;
}
header.site-header {
  border-bottom: 3px solid #b8860b !important;
}
.site-header__initial {
  background: #0f1c2e !important;
}
.sticky-header-toggle {
  background: #0f1c2e !important;
}
/* Slogan / subtitle */
.site-branding__slogan {
  color: #d4a845 !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.1em !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* FIX: White nav background in Olivero */
.site-header__inner,
.header-nav,
.site-header__inner .header-nav,
header .header-nav {
  background: transparent !important;
  background-color: transparent !important;
}

/* Tighten banner margins */
.ad-banner {
  margin: 0.3rem 0 0.8rem 0 !important;
}
.block-block-content + .views-element-container,
.views-element-container {
  margin-top: 0 !important;
}
.main-content .block {
  margin-bottom: 0 !important;
}
.main-content .block + .block {
  margin-top: 0 !important;
}

/* -- Footer Override -- */
#block-olivero-powered, .block-system-powered-by-block { display: none !important; }
.site-footer__inner.container { padding-top: 0 !important; padding-bottom: 0 !important; }
.site-footer { background: linear-gradient(135deg, #0a1220 0%, #0f1c2e 100%) !important; }
.se-footer { padding: 18px 0; text-align: center; }
.se-footer a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .9rem; font-weight: 400; letter-spacing: .05em; transition: color .2s ease; }
.se-footer a:hover { color: #fff; }
/* -- End Footer Override -- */


/* =========================================
   MOBILE RESPONSIVE FIXES (2026-04-05追加)
   ========================================= */

/* 大学合格実績テーブル: 横スクロール対応 */
.school-goukaku-section {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
table.goukaku-table {
  min-width: 560px;
  width: 100%;
}
table.goukaku-table.overseas-table {
  min-width: 420px;
}

/* 入試詳細テーブル: カード幅を画面に合わせる */
.exam-card {
  max-width: 100%;
  overflow-x: auto;
}
.school-exam-detail-table {
  width: 100%;
  min-width: 320px;
}

/* 学校一覧（views-table）: スマホでは横スクロール+必須列表示 */
@media (max-width: 768px) {
  .path-schools .views-element-container,
  .path-schools .view-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .path-schools table.views-table {
    min-width: 720px;
  }
  .path-schools table.views-table thead th,
  .path-schools table.views-table tbody td {
    padding: 0.5rem 0.6rem !important;
    font-size: 0.82rem !important;
    white-space: nowrap;
  }
  /* 学校名列は改行許可 */
  .path-schools table.views-table td.views-field-title,
  .path-schools table.views-table td.views-field-title a {
    white-space: normal;
    min-width: 140px;
    max-width: 200px;
    word-break: keep-all;
    line-height: 1.35;
  }
  .path-schools table.views-table td.views-field-field-school-city {
    white-space: nowrap;
    min-width: 110px;
  }
  .path-schools table.views-table td.views-field-field-school-curriculum {
    white-space: normal;
    min-width: 180px;
    max-width: 260px;
    line-height: 1.35;
  }
}

/* Oliveroモバイルメニュー: 重なり修正（z-indexとヘッダー高調整） */
@media (max-width: 1023px) {
  .site-header,
  .site-header__fixable {
    z-index: 100 !important;
  }
  .mobile-nav-button-wrapper,
  .primary-nav,
  .primary-nav__wrapper {
    z-index: 105 !important;
  }
  /* メニュー展開時のオーバーレイ */
  body.is-always-mobile-nav-expanded .primary-nav,
  body.is-always-mobile-nav-expanded .primary-nav__wrapper {
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  /* site-branding と メニューの重なり防止 */
  .site-branding__slogan {
    font-size: 0.72rem !important;
  }
  .site-branding__name {
    font-size: 1rem !important;
  }
}

/* 狭い画面での文字サイズ */
@media (max-width: 480px) {
  table.goukaku-table thead th,
  table.goukaku-table tbody td {
    padding: 0.4rem 0.5rem !important;
    font-size: 0.75rem !important;
  }
  .exam-card-title {
    font-size: 0.9rem !important;
  }
  .exam-year-tag {
    font-size: 0.7em !important;
    padding: 1px 6px !important;
  }
  .school-exam-detail-table th,
  .school-exam-detail-table td {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.82rem !important;
  }
  .school-exam-detail-table th {
    min-width: 72px;
  }
}

/* === AD BANNERS - Colorful & Sophisticated === */
.ad-banner {
  margin: 1.5rem auto;
  max-width: 700px;
}
.ad-banner a {
  text-decoration: none;
  display: block;
}

.ad-banner-glicc .ad-banner-inner {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 65%, #f5576c 100%);
  border-radius: 16px;
  padding: 1.4rem 1.8rem;
  gap: 1.5rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(118, 75, 162, 0.35), 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  transition: all 0.4s cubic-bezier(.2,.8,.2,1);
}
.ad-banner-glicc .ad-banner-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 60%;
  height: 200%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.22) 50%, transparent 60%);
  transform: rotate(20deg);
  pointer-events: none;
  transition: transform 0.9s ease;
}
.ad-banner-glicc .ad-banner-inner:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(118, 75, 162, 0.45);
}
.ad-banner-glicc .ad-banner-inner:hover::before {
  transform: translateX(300%) rotate(20deg);
}

.ad-banner-logo {
  position: relative;
  font-family: "Noto Serif JP", serif;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  white-space: nowrap;
  background: linear-gradient(135deg, #ffd93d 0%, #ffb84a 50%, #ff9a3d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
  z-index: 1;
}

.ad-banner-text {
  position: relative;
  flex: 1;
  z-index: 1;
}
.ad-banner-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.28);
  letter-spacing: 0.02em;
}
.ad-banner-desc {
  color: rgba(255,255,255,0.95);
  font-size: 0.85rem;
  line-height: 1.55;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.ad-banner-cta {
  display: inline-block;
  color: #4a1a5c;
  background: linear-gradient(135deg, #ffd93d 0%, #ffec4a 100%);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-top: 0.6rem;
  box-shadow: 0 3px 10px rgba(255,217,61,0.45);
  transition: all 0.3s ease;
}
.ad-banner-glicc .ad-banner-inner:hover .ad-banner-cta {
  background: linear-gradient(135deg, #ffec4a 0%, #fff578 100%);
  box-shadow: 0 5px 16px rgba(255,217,61,0.6);
  transform: translateX(3px);
}
.ad-banner-label {
  text-align: right;
  font-size: 0.65rem;
  color: #999;
  margin-top: 0.2rem;
}

/* School detail page inline ad - smaller variant */
.school-ad-inline {
  margin: 2rem 0;
}
.school-ad-inline .ad-banner-glicc .ad-banner-inner {
  padding: 1rem 1.4rem;
}
.school-ad-inline .ad-banner-logo { font-size: 1.55rem; }
.school-ad-inline .ad-banner-title { font-size: 0.95rem; }
.school-ad-inline .ad-banner-desc { font-size: 0.8rem; }

@media (max-width: 600px) {
  .ad-banner-glicc .ad-banner-inner {
    flex-direction: column;
    text-align: center;
    padding: 1.2rem;
    gap: 0.8rem;
  }
  .ad-banner-logo { font-size: 1.7rem; }
}

/* === DUMMY AD SLOTS === */
.gs-ad-slot {
  display: flex;
  justify-content: center;
  margin: 1.2rem auto;
  width: 100%;
}
.gs-ad-slot .gs-ad-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 2px dashed #b0b8c8;
  background: repeating-linear-gradient(45deg, #f7f9fc, #f7f9fc 10px, #eef2f8 10px, #eef2f8 20px);
  color: #5a6478;
  font-family: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", sans-serif;
  border-radius: 8px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
  transition: border-color 0.2s ease;
}
.gs-ad-slot:hover .gs-ad-inner { border-color: #6b7fa8; }
.gs-ad-slot .gs-ad-badge {
  display: inline-block;
  background: #5b6fc9;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.gs-ad-slot .gs-ad-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c3d5e;
}
.gs-ad-slot .gs-ad-size {
  font-size: 0.72rem;
  color: #6b7280;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

/* Slot A : Top banner (PC 728x90 / SP 320x100) */
.gs-ad-slot-a .gs-ad-inner {
  width: 728px;
  max-width: 100%;
  height: 90px;
  background: repeating-linear-gradient(45deg, #fff7e6, #fff7e6 10px, #ffeccc 10px, #ffeccc 20px);
  border-color: #f0b352;
}
.gs-ad-slot-a .gs-ad-badge { background: #e89321; }

/* Slot B : Mid banner (PC 728x90 / SP 320x100) */
.gs-ad-slot-b .gs-ad-inner {
  width: 728px;
  max-width: 100%;
  height: 90px;
  background: repeating-linear-gradient(45deg, #e8f4ff, #e8f4ff 10px, #cfe4fb 10px, #cfe4fb 20px);
  border-color: #6aa8e0;
}
.gs-ad-slot-b .gs-ad-badge { background: #3a7fbd; }

/* Slot C : Inline rectangle (PC 336x280 / SP 300x250) */
.gs-ad-slot-c .gs-ad-inner {
  width: 336px;
  max-width: 100%;
  height: 280px;
  background: repeating-linear-gradient(45deg, #f0e8ff, #f0e8ff 10px, #ddcdfb 10px, #ddcdfb 20px);
  border-color: #8e6ed4;
  gap: 0.6rem;
}
.gs-ad-slot-c .gs-ad-badge { background: #7749c2; }
.gs-ad-slot-c .gs-ad-label { font-size: 1.2rem; }

/* Mobile adjustments */
@media (max-width: 600px) {
  .gs-ad-slot-a .gs-ad-inner,
  .gs-ad-slot-b .gs-ad-inner {
    width: 320px;
    height: 100px;
  }
  .gs-ad-slot-c .gs-ad-inner {
    width: 300px;
    height: 250px;
  }
  .gs-ad-slot .gs-ad-label { font-size: 0.85rem; }
  .gs-ad-slot-c .gs-ad-label { font-size: 1.05rem; }
}

/* === CAROUSEL === */
.gs-carousel {
  position: relative;
  width: 100%;
  margin: 0 auto 1.5rem;
  max-width: 100%;
}
.gs-carousel-track {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.gs-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
}
.gs-carousel-slide::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 60%;
  height: 200%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.18) 50%, transparent 60%);
  transform: rotate(20deg);
  pointer-events: none;
}
.gs-carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  position: relative;
}
.gs-carousel-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  position: relative;
  z-index: 1;
}
.gs-carousel-logo {
  font-family: "Noto Serif JP", serif;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  white-space: nowrap;
  background: linear-gradient(135deg, #ffd93d 0%, #ffb84a 50%, #ff9a3d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.gs-carousel-text { flex: 1; }
.gs-carousel-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  letter-spacing: 0.02em;
}
.gs-carousel-desc {
  color: rgba(255,255,255,0.95);
  font-size: 0.92rem;
  line-height: 1.55;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.gs-carousel-cta {
  display: inline-block;
  color: #4a1a5c;
  background: linear-gradient(135deg, #ffd93d 0%, #ffec4a 100%);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  margin-top: 0.7rem;
  box-shadow: 0 3px 10px rgba(255,217,61,0.5);
}
.gs-carousel-tag {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.08em;
  z-index: 2;
}

/* Premium variant - full width, taller */
.gs-carousel-premium .gs-carousel-track { height: 260px; }
.gs-carousel-premium .gs-carousel-logo { font-size: 2.4rem; }
.gs-carousel-premium .gs-carousel-title { font-size: 1.5rem; }
.gs-carousel-premium .gs-carousel-desc { font-size: 1rem; }

/* Top banner variant - compact */
.gs-carousel-topbanner { max-width: 900px; }
.gs-carousel-topbanner .gs-carousel-track { height: 110px; border-radius: 12px; }
.gs-carousel-topbanner .gs-carousel-slide { padding: 0.9rem 1.4rem; }
.gs-carousel-topbanner .gs-carousel-content { gap: 1rem; }
.gs-carousel-topbanner .gs-carousel-logo { font-size: 1.4rem; }
.gs-carousel-topbanner .gs-carousel-title { font-size: 0.98rem; margin-bottom: 0.2rem; }
.gs-carousel-topbanner .gs-carousel-desc { font-size: 0.8rem; }
.gs-carousel-topbanner .gs-carousel-cta { font-size: 0.75rem; padding: 0.25rem 0.85rem; margin-top: 0.35rem; }

/* Dots */
.gs-carousel-dots {
  position: absolute;
  left: 0; right: 0; bottom: 0.6rem;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  z-index: 3;
}
.gs-carousel-dot {
  width: 8px;
  height: 8px;
  border: none;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.2s ease;
}
.gs-carousel-dot.is-active {
  background: #fff;
  width: 22px;
}

/* Arrows */
.gs-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}
.gs-carousel:hover .gs-carousel-arrow { opacity: 1; }
.gs-carousel-arrow:hover { background: rgba(0,0,0,0.55); }
.gs-carousel-prev { left: 0.8rem; }
.gs-carousel-next { right: 0.8rem; }

.gs-carousel-topbanner .gs-carousel-arrow { width: 28px; height: 28px; font-size: 1.1rem; }

/* Responsive */
@media (max-width: 768px) {
  .gs-carousel-premium .gs-carousel-track { height: 180px; }
  .gs-carousel-premium .gs-carousel-logo { font-size: 1.8rem; }
  .gs-carousel-premium .gs-carousel-title { font-size: 1.1rem; }
  .gs-carousel-premium .gs-carousel-desc { font-size: 0.85rem; }
  .gs-carousel-topbanner .gs-carousel-track { height: 100px; }
  .gs-carousel-topbanner .gs-carousel-logo { font-size: 1.1rem; }
  .gs-carousel-topbanner .gs-carousel-title { font-size: 0.88rem; }
  .gs-carousel-topbanner .gs-carousel-desc { font-size: 0.74rem; }
}
@media (max-width: 480px) {
  .gs-carousel-premium .gs-carousel-track { height: 160px; }
  .gs-carousel-slide { padding: 1rem 1.2rem; }
  .gs-carousel-content { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .gs-carousel-premium .gs-carousel-logo { font-size: 1.5rem; }
}

/* === ADSENSE PLACEHOLDER === */
.gs-adsense,
.gs-adsense-placeholder {
  display: flex;
  justify-content: center;
  margin: 1.5rem auto;
  width: 100%;
  max-width: 900px;
}
.gs-adsense-placeholder .gs-adsense-ph-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 728px;
  max-width: 100%;
  min-height: 90px;
  padding: 1rem 1.5rem;
  border: 2px dashed #4285f4;
  border-radius: 10px;
  background: linear-gradient(135deg, #f1f7ff 0%, #e8f0fe 100%);
  color: #1a73e8;
  font-family: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", sans-serif;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(66,133,244,0.12);
}
.gs-adsense-ph-badge {
  display: inline-block;
  background: #4285f4;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.gs-adsense-ph-label {
  font-size: 1rem;
  font-weight: 700;
  color: #174ea6;
}
.gs-adsense-ph-size {
  font-size: 0.75rem;
  color: #5f6368;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.gs-adsense-ph-note {
  font-size: 0.72rem;
  color: #70757a;
  font-style: italic;
}

/* Rectangle variant for inline */
.gs-adsense-placeholder-rect .gs-adsense-ph-inner {
  width: 336px;
  min-height: 280px;
}

@media (max-width: 600px) {
  .gs-adsense-placeholder .gs-adsense-ph-inner { width: 320px; min-height: 100px; }
  .gs-adsense-placeholder-rect .gs-adsense-ph-inner { width: 300px; min-height: 250px; }
}

/* === FOOTER NAV === */
.gs-footer-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  text-align: center;
  color: rgba(255,255,255,0.85);
}
.gs-footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}
.gs-footer-links li { position: relative; }
.gs-footer-links a {
  color: #ffd93d !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.gs-footer-links a:hover {
  color: #fff !important;
  text-decoration: underline;
}
.gs-footer-nav .se-footer {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.8rem;
}
@media (max-width: 600px) {
  .gs-footer-links { gap: 0.3rem 1.2rem; }
  .gs-footer-links a { font-size: 0.82rem; }
}

/* === PRIVACY / TERMS / CONTACT - white box, black text === */
.page-node-type-page article,
.path-contact main article,
.path-contact .layout-content {
  background: #fff !important;
  color: #222 !important;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin: 1.5rem auto;
  max-width: 900px;
}
.page-node-type-page article *,
.path-contact main * {
  color: #222 !important;
}
.page-node-type-page article h1,
.page-node-type-page article h2,
.page-node-type-page article h3,
.path-contact main h1,
.path-contact main h2 {
  color: #1a3050 !important;
}
.page-node-type-page article a,
.path-contact main a {
  color: #1a73e8 !important;
  text-decoration: underline;
}
.page-node-type-page article a:hover,
.path-contact main a:hover {
  color: #0d47a1 !important;
}
.page-node-type-page article h2 {
  margin-top: 1.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e0e6ed;
  font-size: 1.25rem;
}
.page-node-type-page article h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.page-node-type-page article ul,
.page-node-type-page article ol {
  padding-left: 1.5rem;
}
.page-node-type-page article li {
  margin: 0.3rem 0;
}
.page-node-type-page article p {
  line-height: 1.75;
  margin: 0.6rem 0;
}
/* Contact form styling */
.path-contact main .form-item label,
.path-contact main legend {
  color: #222 !important;
  font-weight: 600;
}
.path-contact main input[type="text"],
.path-contact main input[type="email"],
.path-contact main textarea {
  background: #fff !important;
  color: #222 !important;
  border: 1px solid #c0c8d4;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
}

/* === PREMIUM CAROUSEL - GLICC & Study Extension polish === */
.gs-carousel-slide--real .gs-carousel-logo {
  font-family: "Noto Serif JP", "Georgia", serif;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  filter: none;
}
.gs-carousel-slide--real .gs-carousel-title {
  font-size: 1.4rem;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.gs-carousel-slide--real .gs-carousel-desc {
  font-size: 0.95rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.gs-carousel-slide--real .gs-carousel-cta {
  background: rgba(255,255,255,0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
  box-shadow: none;
}
.gs-carousel-slide--real:hover .gs-carousel-cta {
  background: rgba(255,255,255,0.4);
}
@media (max-width: 768px) {
  .gs-carousel-slide--real .gs-carousel-logo { font-size: 1.6rem; }
  .gs-carousel-slide--real .gs-carousel-title { font-size: 1.1rem; }
}

/* Hide dummy ad slots from public pages */
.gs-ad-slot { display: none !important; }
