/* ============================================
   Font Import
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&family=Zen+Kaku+Gothic+New:wght@700;900&display=swap');

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
  /* Colors */
  --color-primary: #C46A4A;
  --color-text: #333;
  --color-text-muted: #666;
  --color-text-light: #888;
  --color-text-lighter: #999;
  --color-bg: #F5F0EB;
  --color-membership-bg: #FFEB82;
  --color-accent: #FFEB82;
  --color-border: #ddd;
  --color-muted-bg: #eee;

  /* Fonts */
  --font-sans: 'Zen Kaku Gothic New', sans-serif;
  --font-heading: 'Poppins', sans-serif;

  /* Layout */
  --max-width: 1920px;
}

html {
  scroll-behavior: smooth;
}

/* ============================================
   Sub-page body offset for fixed header
   (トップページは top.css で独自に設定)
   ============================================ */
body:not(.top-page) {
  padding-top: clamp(70px, calc(50px + 2.604vw), 100px);
}

/* ============================================
   Reset — 親テーマ(the-thor)の影響を排除
   ヘッダー・フッター・固定ボタンのみスコープ
   ============================================ */
.site-header,
.site-header *,
.site-header *::before,
.site-header *::after,
.site-footer,
.site-footer *,
.site-footer *::before,
.site-footer *::after,
.fixed-buttons,
.fixed-buttons *,
.fixed-buttons *::before,
.fixed-buttons *::after,
.article-menu-overlay,
.search-overlay,
.search-overlay *,
.search-overlay *::before,
.search-overlay *::after {
  all: revert;
}

.site-header,
.site-header *,
.site-header *::before,
.site-header *::after,
.site-footer,
.site-footer *,
.site-footer *::before,
.site-footer *::after,
.fixed-buttons,
.fixed-buttons *,
.fixed-buttons *::before,
.fixed-buttons *::after,
.article-menu-overlay,
.search-overlay,
.search-overlay *,
.search-overlay *::before,
.search-overlay *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.site-header,
.site-footer,
.fixed-buttons {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.6;
}

.site-header a,
.site-footer a,
.fixed-buttons a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s;
}

.site-header a:hover,
.site-footer a:hover {
  opacity: 0.7;
}

.site-header ul,
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.site-header img,
.site-footer img,
.fixed-buttons img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

.site-header p,
.site-header h1,
.site-header h2,
.site-header h3,
.site-header h4,
.site-footer p,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
  margin: 0;
  padding: 0;
}

.site-header input,
.site-header select,
.site-header textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.site-header input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: auto;
}

.site-header select {
  appearance: auto;
  -webkit-appearance: auto;
}

/* ============================================
   Common: Buttons (header/footer shared)
   親テーマの干渉を防ぐため、コンテナでスコープ (0-2-0)
   ============================================ */
.site-header .btn-login,
.site-header .btn-register,
.site-footer .btn-login,
.site-footer .btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(140px, calc(100px + 5.208vw), 200px);
  height: clamp(42px, calc(30px + 1.563vw), 60px);
  border-radius: clamp(25px, calc(18px + 0.911vw), 35px);
  border: 2px solid var(--color-primary);
  font-size: clamp(11px, calc(8px + 0.417vw), 16px);
  font-family: var(--font-sans);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s;
}

.site-header .btn-login {
  color: #fff;
  background: var(--color-primary);
}

.fms-session-type-0 .site-header .btn-login {
  color: var(--color-primary);
  background: transparent;
}


.site-header .btn-register {
  background: #fff;
  color: var(--color-primary);
}

.fms-session-type-0 .site-header .btn-register{
  background: var(--color-primary);
  color: #fff;
}

/* ============================================
   Header Buttons SP (hidden by default)
   ============================================ */
.header-buttons-sp {
  display: none;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}

.site-header .header-nav {
  display: flex;
  align-items: center;
  padding: 0 clamp(98px, calc(70px + 3.646vw), 140px) 0 clamp(35px, calc(25px + 1.302vw), 50px);
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: clamp(70px, calc(50px + 2.604vw), 100px);
  box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.05);
}

.site-header .site-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(14px, calc(10px + 0.521vw), 20px);
  flex-shrink: 0;
}

.site-header .site-title a {
  display: block;
}

.site-header .site-logo {
  width: clamp(144px, calc(103px + 5.365vw), 206px);
  height: clamp(35px, calc(25px + 1.302vw), 50px);
  object-fit: contain;
}

.site-header .site-description {
  font-size: clamp(11px, calc(8px + 0.417vw), 16px);
  line-height: clamp(18px, calc(13px + 0.651vw), 25px);
  letter-spacing: 0.05em;
}

.site-header .global-nav {
  display: flex;
  align-items: center;
  gap: clamp(30px, calc(30px + 1.563vw), 60px);
  margin-left: auto;
}

.site-header .global-nav .global-nav__item a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(10px, calc(8px + 0.391vw), 15px);
  font-size: clamp(11px, calc(8px + 0.391vw), 15px);
  white-space: nowrap;
  transition: color 0.3s;
}

@media (hover: hover) {
  .site-header .global-nav .global-nav__item a:hover {
    opacity: 1;
    color: var(--color-primary);
  }

  .site-header .global-nav .global-nav__item a:hover .menu-arrow {
    filter: brightness(0) saturate(100%) invert(46%) sepia(50%) saturate(700%) hue-rotate(338deg) brightness(92%) contrast(88%);
  }
}

.site-header .global-nav .global-nav__item:nth-child(-n+2) .nav-icon {
  height: clamp(18px, calc(13px + 0.651vw), 25px);
  width: auto;
}

.site-header .global-nav .global-nav__item:nth-child(3) .nav-icon {
  height: clamp(14px, calc(10px + 0.521vw), 20px);
  width: auto;
}

.site-header .header-buttons {
  display: flex;
  gap: clamp(10px, calc(8px + 0.391vw), 15px);
  margin-left: clamp(25px, calc(25px + 1.302vw), 50px);
  flex-shrink: 0;
}

.site-header .mobile-submenu {
  display: none;
}

.site-header .global-nav__item--faq {
  display: none;
}

.site-header .mobile-menu-sns {
  display: none;
}

.site-header .btn-search {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header .btn-search img {
  width: clamp(70px, calc(50px + 2.604vw), 100px);
  height: clamp(70px, calc(50px + 2.604vw), 100px);
}

.site-header .menu-arrow {
  width: 10px;
  height: 6px;
  margin-left: 5px;
  transition: transform 0.3s;
}

.site-header .global-nav__item--articles.is-open .menu-arrow {
  transform: rotate(180deg);
}

/* Article Menu Modal */
.site-header .article-menu-modal {
  display: none;
  position: fixed;
  top: clamp(84px, calc(60px + 3.125vw), 120px);
  width: clamp(359px, calc(257px + 13.359vw), 513px);
  height: clamp(157px, calc(112px + 5.833vw), 224px);
  background: #fff;
  border-radius: clamp(14px, calc(10px + 0.521vw), 20px);
  align-items: center;
  justify-content: center;
  gap: clamp(35px, calc(25px + 1.302vw), 50px);
  z-index: 101;
}

.site-header .article-menu-modal.is-open {
  display: flex;
}

.article-menu-modal__col {
  display: flex;
  flex-direction: column;
  gap: clamp(21px, calc(15px + 0.781vw), 30px);
}

.article-menu-modal__col li a {
  display: flex;
  align-items: center;
  gap: clamp(10px, calc(8px + 0.391vw), 15px);
  font-size: clamp(13px, calc(9px + 0.469vw), 18px);
  color: var(--color-text);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.article-menu-modal__col li a::before {
  content: '';
  display: block;
  width: 15px;
  height: 2px;
  background: var(--color-primary);
  flex-shrink: 0;
}

/* Article Menu Overlay */
.article-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9998;
}

.article-menu-overlay.is-open {
  display: block;
}

/* ============================================
   Search Modal
   ============================================ */
.search-modal {
  display: none;
  width: calc(100% - clamp(182px, calc(130px + 6.771vw), 260px));
  max-width: 1460px;
  margin: clamp(137px, calc(98px + 5.078vw), 195px) auto clamp(140px, calc(100px + 5.208vw), 200px);
  background: #fff;
  border-radius: clamp(14px, calc(10px + 1.563vw), 40px);
  padding: clamp(70px, calc(50px + 2.604vw), 100px) clamp(100px, 9.375vw, 180px) clamp(84px, calc(60px + 3.125vw), 120px);
  position: relative;
  z-index: 101;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

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

.search-modal.is-open {
  display: block;
}

.search-modal__close {
  position: absolute;
  top: clamp(105px, calc(75px + 3.906vw), 150px);
  right: clamp(32px, calc(23px + 1.172vw), 45px);
  width: clamp(49px, calc(35px + 1.823vw), 70px);
  height: clamp(49px, calc(35px + 1.823vw), 70px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid #fff;
  z-index: 9999;
  display: none;
  cursor: pointer;
  box-sizing: border-box;
}

.search-modal__close::before,
.search-modal__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(17px, calc(13px + 0.781vw), 28px);
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.search-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.search-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.search-modal .search-modal__title {
  font-size: clamp(15px, calc(11px + 0.573vw), 22px);
  letter-spacing: 0.05em;
  margin-bottom: clamp(21px, calc(15px + 0.781vw), 30px);
}

.search-modal .search-modal__desc {
  font-size: clamp(14px, calc(10px + 0.521vw), 20px);
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: clamp(25px, calc(18px + 0.911vw), 35px);
  line-height: 2.5;
}

/* SP専用改行: PCでは非表示、SP(767px以下)で表示 */
.br-sp {
  display: none;
}

.search-modal .search-modal__line {
  width: clamp(42px, calc(30px + 1.563vw), 60px);
  height: 2px;
  background: var(--color-primary);
  margin: 0 auto clamp(70px, calc(50px + 2.604vw), 90px);
}

.search-modal .search-form__group {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
}

.search-modal .search-form__label {
  font-size: 16px;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  width: 230px;
  flex-shrink: 0;
  height: 25px;
  line-height: 23px;
  border-left: 5px var(--color-primary) solid;
  padding-left: 20px;
  color: var(--color-primary);
}

.search-modal .search-form__radios {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
}

.search-modal .search-form__radio {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.search-modal .search-form__radio input[type="radio"] {
  display: none;
}

.search-modal .search-form__radio-circle {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.search-modal .search-form__radio input[type="radio"]:checked+.search-form__radio-circle {
  border-color: var(--color-primary);
}

.search-modal .search-form__radio input[type="radio"]:checked+.search-form__radio-circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 50%;
}

.search-modal .search-form__radio-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.search-modal .search-form__input {
  width: 100%;
  height: 75px;
  padding: 0 40px;
  border: none;
  border-radius: 10px;
  box-shadow: inset 0px 1px 8px 1px rgba(0, 0, 0, 0.1);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  background: #fff;
}

.search-modal .search-form__input::placeholder {
  color: #b4b4b4;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.05em;
}

.search-modal .search-form__input:focus {
  outline: none;
  box-shadow: inset 0px 1px 8px 1px rgba(0, 0, 0, 0.15);
}

.search-modal .search-form__select {
  width: 100%;
  height: 75px;
  padding: 0 40px;
  border: none;
  border-radius: 10px;
  box-shadow: inset 0px 1px 8px 1px rgba(0, 0, 0, 0.1);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  /* background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); */
  background-image: url('../img/top/more_arrow.png');
  background-size: 12px auto;
  background-repeat: no-repeat;
  background-position: right 40px center;
}

.search-modal .search-form__select:focus {
  outline: none;
  box-shadow: inset 0px 1px 8px 1px rgba(0, 0, 0, 0.15);
}

.search-modal .search-form__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}

.search-modal .search-form__tags label {
  cursor: pointer;
}

.search-modal .widgetSearch__check {
  display: none;
}

/* 親テーマが ::before/::after で描画するカスタムチェックボックスを消す（全ページ共通） */
.search-modal .widgetSearch__checkLabel::before,
.search-modal .widgetSearch__checkLabel::after {
  content: none !important;
  display: none !important;
}

.search-modal .widgetSearch__checkLabel {
  display: inline-block;
  padding: 0 16px;
  height: 36px;
  line-height: 32px;
  border: 1.5px solid #B4B4B4;
  border-radius: 36px;
  font-size: 14px;
  color: #B4B4B4;
  transition: background 0.2s, color 0.2s;
}

.search-modal .widgetSearch__check:checked+.widgetSearch__checkLabel {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);

}

/* 初期状態: フィールドグループ・送信ボタンは非表示 */
.search-modal .search-form__fields {
  display: none;
}

.search-modal .search-form__fields.is-active {
  display: block;
}

.search-modal .search-form__actions {
  display: none;
  margin-top: 35px;
  text-align: center;
}

.search-modal .search-form__actions.is-active {
  display: block;
}

.search-modal .search-form__submit-btn {
  width: clamp(140px, calc(100px + 5.208vw), 200px);
  height: clamp(39px, calc(28px + 1.432vw), 55px);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-sans);
  font-size: clamp(11px, calc(8px + 0.417vw), 16px);
  font-weight: 700;
  border: none;
  border-radius: 55px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.3s;
}

.search-modal .search-form__submit-btn:hover {
  opacity: 0.7;
}

.search-fixed-submit {
  display: none;
}

.search-ai-banner {
  display: none;
  width: fit-content;
  max-width: 90%;
  margin: clamp(42px, calc(30px + 1.563vw), 60px) auto;
  background: var(--color-membership-bg);
  padding: clamp(18px, calc(13px + 0.651vw), 25px) clamp(32px, calc(23px + 1.172vw), 45px);
  border-radius: clamp(42px, calc(30px + 1.563vw), 60px);
  position: relative;
}

.search-ai-banner.is-active {
  display: block;
}

.search-ai-banner__inner {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-ai-banner__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.search-ai-banner__link {
  color: var(--color-primary);
}

.search-ai-banner__text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.8;
  color: #333;
  margin: 0;
  flex: 1;
}

.search-ai-banner__text strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.search-ai-banner__chara {
  width: 7vw;
  height: auto;
  position: absolute;
  right: -4vw;
  bottom: 0;
}

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9998;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.search-overlay.is-open {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--color-primary);
  color: #fff;
  margin-top: var(--section-gap);
}

.site-footer .footer-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  column-gap: clamp(35px, calc(25px + 1.302vw), 50px);
  row-gap: clamp(63px, calc(45px + 2.344vw), 90px);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(70px, calc(50px + 2.604vw), 100px) clamp(105px, calc(75px + 3.906vw), 150px) clamp(84px, calc(60px + 3.125vw), 120px);
}

.site-footer .footer-col--brand {
  grid-row: 1 / -1;
}

.site-footer .footer-col:not(.footer-col--brand) {
  display: contents;
}

.site-footer .footer-nav-group--articles {
  order: 1;
}

.site-footer .footer-nav-group--reading {
  order: 2;
}

.site-footer .footer-nav-group--membership {
  order: 3;
}

.site-footer .footer-nav-group--info {
  order: 4;
}

.site-footer .footer-nav-group--links {
  order: 5;
}

.site-footer .footer-nav-group--links .list-border::before {
  display: none;
}

.site-footer .footer-logo img {
  width: clamp(144px, calc(103px + 5.365vw), 206px);
  height: clamp(35px, calc(25px + 1.302vw), 50px);
  object-fit: contain;
  margin-bottom: clamp(25px, calc(18px + 0.911vw), 35px);
}

.site-footer .footer-description {
  font-weight: 500;
  font-size: clamp(13px, calc(9px + 0.469vw), 18px);
  line-height: clamp(28px, calc(20px + 1.042vw), 40px);
  letter-spacing: 0.05em;
  width: clamp(224px, calc(160px + 8.333vw), 320px);
  margin-bottom: clamp(28px, calc(20px + 1.042vw), 40px);
}

.site-footer .footer-buttons {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, calc(8px + 0.391vw), 15px);
  margin-bottom: clamp(35px, calc(25px + 1.302vw), 50px);
}

.site-footer .btn-login,
.site-footer .btn-register {
  width: clamp(224px, calc(160px + 8.333vw), 320px);
  height: clamp(60px, calc(43px + 2.214vw), 85px);
  border-radius: clamp(42px, calc(30px + 1.563vw), 60px);
  font-size: clamp(14px, calc(10px + 0.521vw), 20px);
  line-height: 20px;
  letter-spacing: 0.03em;
}

.site-footer .btn-login {
  background: #fff;
  color: var(--color-primary);
}

.site-footer .btn-register {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.site-footer .footer-sns {
  display: flex;
  align-items: center;
  gap: clamp(25px, calc(18px + 0.911vw), 35px);
}

.site-footer .footer-sns img {
  height: clamp(32px, calc(23px + 1.172vw), 45px);
  width: auto;
}

.site-footer .footer-sns li:nth-child(2) img {
  height: clamp(28px, calc(20px + 1.042vw), 40px);
}

.site-footer .footer-nav-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(20px, calc(14px + 0.729vw), 28px);
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: clamp(21px, calc(15px + 0.781vw), 30px);
  border-bottom: 1px solid #fff;
  margin-bottom: clamp(28px, calc(20px + 1.042vw), 40px);
}

.site-footer .footer-nav-subheading {
  font-size: clamp(13px, calc(9px + 0.469vw), 18px);
  line-height: clamp(25px, calc(18px + 0.911vw), 35px);
  letter-spacing: 0.05em;
  margin-bottom: clamp(14px, calc(10px + 0.521vw), 20px);
}

.site-footer .footer-nav-list li {
  margin-bottom: clamp(21px, calc(15px + 0.781vw), 30px);
}

.site-footer .footer-nav-list li:last-of-type {
  margin-bottom: 0;
}

.site-footer .footer-nav-list li a {
  font-size: clamp(13px, calc(9px + 0.469vw), 18px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-footer .footer-nav-list .list-border {
  margin-bottom: clamp(18px, calc(13px + 0.651vw), 25px);
  display: flex;
  align-items: center;
  gap: clamp(7px, calc(5px + 0.26vw), 10px);
  padding-left: clamp(21px, calc(15px + 0.781vw), 30px);
}

.site-footer .footer-nav-list .list-border::before {
  content: "";
  width: 20px;
  min-width: 20px;
  height: 1px;
  background-color: #fff;
  flex-shrink: 0;
}

.site-footer .footer-nav-list .list-border a {
  gap: 15px;
  letter-spacing: 0.9px;
}

.site-footer .icon-link {
  width: 20px;
  height: 16px;
}

.site-footer .icon-external {
  width: 14px;
  height: auto;
  display: inline;
}

.site-footer .copyright {
  background: #fff;
  color: #333;
  height: clamp(56px, calc(40px + 2.083vw), 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer .copyright p {
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 5%;
}

.site-footer .copyright small {
  font-size: inherit;
}

/* ============================================
   Fixed Buttons (Quick AI + Page Top)
   ============================================ */
.fixed-buttons {
  position: fixed;
  right: clamp(28px, calc(20px + 1.042vw), 40px);
  bottom: clamp(28px, calc(20px + 1.042vw), 40px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.quick-ai {
  display: block;
  width: clamp(84px, calc(60px + 3.125vw), 120px);
  margin-bottom: clamp(14px, calc(10px + 0.521vw), 20px);
}

.quick-ai img {
  width: 100%;
  height: auto;
}

.page-top {
  display: block;
  width: clamp(49px, calc(35px + 1.823vw), 70px);
}

.page-top img {
  width: 100%;
  height: auto;
}

body.menu-open .fixed-buttons {
  display: none;
}

/* Hamburger Button (hidden on desktop) */
.btn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 8px;
  z-index: 200;
  cursor: pointer;
  border: none;
  background: none;
}

.btn-hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.btn-hamburger.is-open .btn-hamburger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.btn-hamburger.is-open .btn-hamburger__line:nth-child(2) {
  opacity: 0;
}

.btn-hamburger.is-open .btn-hamburger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   Responsive: Sub-Desktop (< 1460px)
   ============================================ */
@media (max-width: 1459px) {
  .search-modal {
    margin-top: 130px;
    width: calc(100% - 120px);
    max-width: 900px;
    padding: 35px 40px 40px;
  }

  .search-modal__close {
    top: 125px;
    right: 45px;
    width: 56px;
    height: 56px;
  }

  .search-modal__close::before,
  .search-modal__close::after {
    width: 16px;
    height: 2px;
  }

  .search-modal .search-form__group {
    flex-direction: column;
    gap: 10px;
  }

  .search-modal .search-form__label {
    width: auto;
  }

  .search-modal .search-form__tags {
    gap: 8px;
  }

  .search-modal .widgetSearch__checkLabel {
    height: 34px;
    line-height: 32px;
    padding: 0 14px;
    font-size: 13px;
  }

  .search-modal .search-modal__desc {
    font-size: 18px;
    margin-bottom: 28px;
  }

  .search-modal .search-modal__line {
    margin-bottom: 70px;
  }

  .search-modal .search-form__actions {
    margin-top: 30px;
  }
}

/* ============================================
   Responsive: Tablet (< 1400px)
   ============================================ */
@media (max-width: 1399px) {
  body:not(.top-page) {
    padding-top: 70px;
  }

  .site-header .header-nav {
    padding: 0 20px;
    min-height: 70px;
  }

  .site-header .site-description {
    display: none;
  }

  .site-header .global-nav {
    display: none;
  }

  .site-header .header-buttons {
    display: none;
  }

  .site-header .article-menu-modal {
    display: none !important;
  }

  .site-header .site-logo {
    height: 40px;
    width: auto;
  }

  .site-header .btn-search {
    position: static;
    margin-left: auto;
  }

  .site-header .btn-search img {
    width: 18px;
    height: 18px;
  }

  .btn-hamburger {
    display: flex;
    width: 25px;
    height: 16px;
    gap: 5px;
    padding: 0;
    margin-left: 18px;
  }

  .btn-hamburger__line {
    height: 2px;
    background: #B4B4B4;
    border-radius: 20px;
  }

  .btn-hamburger.is-open .btn-hamburger__line:nth-child(1) {
    transform: translateY(7px) rotate(35deg);
  }

  .btn-hamburger.is-open .btn-hamburger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-35deg);
  }

  /* Mobile menu overlay */
  .site-header .global-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    padding: 0 25px 40px;
    overflow-y: auto;
    z-index: 100;
    animation: menuFadeIn 0.5s ease both;
  }

  @keyframes menuFadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .site-header .global-nav.is-open .global-nav__item {
    border-bottom: 1px solid var(--color-border);
  }

  .site-header .global-nav.is-open .global-nav__item a {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    padding: 22px 0;
    white-space: nowrap;
  }

  .site-header .global-nav.is-open .global-nav__item .nav-icon {
    height: 20px;
    width: auto;
    flex-shrink: 0;
  }

  .site-header .global-nav.is-open .global-nav__item:nth-child(3) .nav-icon {
    width: 20px;
    height: auto;
  }

  .site-header .global-nav.is-open .global-nav__item--faq {
    display: list-item;
  }

  .site-header .global-nav.is-open .global-nav__item--articles .article-menu-trigger .menu-arrow {
    margin-left: auto;
    width: 14px;
    height: 8px;
    transition: transform 0.3s;
  }

  .site-header .global-nav.is-open .mobile-submenu {
    display: none;
    padding: 0 0 15px 40px;
  }

  .site-header .global-nav.is-open .global-nav__item--articles.is-open .mobile-submenu {
    display: block;
  }

  .site-header .global-nav.is-open .mobile-submenu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    padding: 10px 0;
    color: var(--color-text);
  }

  .site-header .global-nav.is-open .mobile-submenu li a::before {
    content: '';
    display: block;
    width: 14px;
    height: 2px;
    background: var(--color-primary);
    flex-shrink: 0;
  }

  .site-header .header-buttons.is-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    margin-left: 0;
  }

  .site-header .header-buttons.is-open .btn-login,
  .site-header .header-buttons.is-open .btn-register {
    width: 260px;
    height: 60px;
    font-size: 16px;
  }

  .site-header .header-buttons.is-open .btn-login {
    background-color: var(--color-primary);
    color: #fff;
  }

  .fms-session-type-0 .site-header .header-buttons.is-open .btn-login {
    background-color: #fff;
    color: var(--color-primary);
  }

  .mobile-menu-sns.is-open {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
  }

  .mobile-menu-sns.is-open img {
    height: 30px;
    width: auto;
  }

  .mobile-menu-sns.is-open li:nth-child(2) img {
    height: 27px;
  }

  /* Footer */
  .site-footer .footer-body {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    padding: 80px 50px 100px;
    row-gap: 60px;
  }

  .site-footer .footer-col--brand {
    grid-row: auto;
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    align-items: flex-start;
  }

  .site-footer .footer-col:not(.footer-col--brand) {
    display: block;
  }

  .site-footer .footer-description {
    width: 100%;
  }

  .site-footer .footer-buttons {
    flex-direction: row;
  }

  .site-footer .btn-login,
  .site-footer .btn-register {
    width: 260px;
  }

  /* Search modal */
  .search-modal {
    margin-top: 80px;
    width: calc(100% - 40px);
    max-width: 580px;
    padding: 30px 28px 35px;
  }

  .search-modal__close {
    top: 90px;
    right: 45px;
    width: 50px;
    height: 50px;
  }

  .search-modal .search-modal__title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .search-modal .search-modal__desc {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .search-modal .search-modal__line {
    width: 50px;
    margin-bottom: 50px;
  }

  .search-modal .search-form__group {
    margin-bottom: 20px;
  }

  /* Fixed Buttons */
  .fixed-buttons {
    right: 20px;
    bottom: 20px;
  }

  .quick-ai {
    width: 80px;
    margin-bottom: 15px;
  }

  .page-top {
    width: 50px;
  }
}

/* ============================================
   Responsive: Mobile (< 768px)
   ============================================ */
@media (max-width: 767px) {
  body:not(.top-page) {
    padding-top: 76px;
  }

  /* Header */
  .site-header .header-nav {
    padding: 13px 25px;
    min-height: auto;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
  }

  .site-header .site-logo {
    width: 99px;
    height: 24px;
    object-fit: contain;
  }

  .site-header .btn-search img {
    width: 18px;
    height: 18px;
  }

  .btn-hamburger {
    width: 25px;
    height: 16px;
    gap: 5px;
    padding: 0;
    margin-left: 18px;
  }

  .btn-hamburger__line {
    height: 2px;
    background: #B4B4B4;
    border-radius: 20px;
  }

  .btn-hamburger.is-open .btn-hamburger__line:nth-child(1) {
    transform: translateY(7px) rotate(35deg);
  }

  .btn-hamburger.is-open .btn-hamburger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-35deg);
  }

  /* SP Buttons Bar */
  .header-buttons-sp {
    display: flex;
    justify-content: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
  }

  body.search-open .header-buttons-sp,
  body.menu-open .header-buttons-sp {
    display: none;
  }

  .btn-login-sp,
  .btn-register-sp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 50%;
    height: 45px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
  }

  .header-buttons-sp .btn-login-sp {
    background: #FBF6EE;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
  }

  .header-buttons-sp .btn-register-sp {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: #fff;
  }

  /* Mobile menu */
  .site-header .global-nav.is-open {
    top: 50px;
    padding-top: 10px;
  }

  .site-header .global-nav.is-open .global-nav__item a {
    font-size: 15px;
    padding: 30px 0;
  }

  .site-header .global-nav.is-open .mobile-submenu li a {
    font-size: 14px;
    padding: 8px 0;
  }

  .site-header .header-buttons.is-open .btn-login,
  .site-header .header-buttons.is-open .btn-register {
    width: 220px;
    height: 55px;
    font-size: 15px;
    margin-left: 0;
    border-radius: 50px;
  }

  /* Footer */
  .site-footer .footer-body {
    grid-template-columns: 1fr 1fr;
    padding: 50px 10px 40px;
    row-gap: 35px;
    column-gap: 15px;
  }

  .site-footer .footer-col--brand {
    display: contents;
  }

  .site-footer .footer-col:not(.footer-col--brand) {
    display: contents;
  }

  .site-footer .footer-nav-group--articles,
  .site-footer .footer-nav-group--reading,
  .site-footer .footer-nav-group--membership,
  .site-footer .footer-nav-group--info,
  .site-footer .footer-nav-group--links {
    min-width: 0;
  }

  .site-footer .footer-nav-group {
    overflow-wrap: break-word;
  }

  .site-footer .footer-logo {
    order: 6;
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 35px;
    margin-bottom: -10px;
    padding-top: 60px;
    border-top: 1px #fff solid;
  }

  .site-footer .footer-logo img {
    width: 140px;
    margin: 0 auto;
  }

  .site-footer .footer-description {
    order: 7;
    grid-column: 1 / -1;
    text-align: center;
    font-size: 11px;
    line-height: 1.8;
    width: auto;
    margin-bottom: 10px;
  }

  /* SP専用改行を表示 */
  .br-sp {
    display: block;
  }

  .site-footer .footer-buttons {
    order: 8;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 5px;
  }

  .site-footer .btn-login,
  .site-footer .btn-register {
    width: 100%;
    max-width: 280px;
    height: 55px;
    font-size: 14px;
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
  }

  .site-footer .btn-login {
    background-color: #fff;
    color: var(--color-primary);
  }

  .site-footer .footer-sns {
    order: 9;
    grid-column: 1 / -1;
    justify-content: center;
    gap: 18px;
    margin-bottom: 30px;
  }

  .site-footer .footer-sns img {
    height: 28px;
  }

  .site-footer .footer-sns li:nth-child(2) img {
    height: 26px;
  }

  .site-footer .footer-nav-heading {
    font-size: 14px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
  }

  .site-footer .footer-nav-subheading {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 8px;
  }

  .site-footer .footer-nav-list li {
    margin-bottom: 10px;
  }

  .site-footer .footer-nav-list li a {
    font-size: 12px;
    display: flex;
    word-break: break-all;
  }

  .site-footer .footer-nav-list .list-border {
    margin-bottom: 10px;
    padding-left: 10px;
    gap: 8px;
  }

  .site-footer .footer-nav-list .list-border::before {
    width: 12px;
    min-width: 12px;
  }

  .site-footer .footer-nav-list .list-border a {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .site-footer .icon-link {
    width: 10px;
    height: 8px;
  }

  .site-footer .copyright {
    height: 50px;
  }

  .site-footer .copyright p {
    font-size: 11px;
  }

  /* Buttons (header base) */
  .btn-login,
  .btn-register {
    width: 160px;
    height: 50px;
    font-size: 14px;
  }

  /* Search modal */
  .search-modal {
    margin-top: 135px;
    width: 100%;
    max-width: none;
    padding: 50px 25px;
    border-radius: 20px;
  }

  .search-modal__close {
    top: 70px;
    right: 25px;
    width: 40px;
    height: 40px;
    border-radius: 40px;
    border: 1px solid #FFF;
    background: rgba(255, 255, 255, 0.15);
  }

  .search-modal__close::before,
  .search-modal__close::after {
    background: #fff;
  }

  .search-modal__close::before,
  .search-modal__close::after {
    width: 16px;
    height: 2px;
  }

  .search-modal .search-modal__title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .search-modal .search-modal__desc {
    font-size: 14px;
    line-height: 30px;
    letter-spacing: 0.08em;
    margin-bottom: 40px;
  }

  .search-modal .search-modal__line {
    width: 0;
    margin-bottom: 0;
    display: none;
  }

  .search-modal .search-form__group {
    margin-bottom: 60px;
    gap: 6px;
    align-items: flex-start;
  }

  .search-modal .search-form__label {
    font-size: 12px;
    height: 42px;
    line-height: 40px;
    text-align: center;
    border-left-width: 0;
    border-top: 1px var(--color-primary) solid;
    border-bottom: 1px var(--color-primary) solid;
    margin-bottom: 30px;
    width: 100%;
  }

  .search-modal .search-form__radios {
    flex-direction: column;
    gap: 22px;
    align-items: flex-start;
  }

  .search-modal .search-form__radio-circle {
    width: 16px;
    height: 16px;
  }

  .search-modal .search-form__radio input[type="radio"]:checked+.search-form__radio-circle::after {
    width: 8px;
    height: 8px;
  }

  .search-modal .search-form__radio-text {
    font-size: 14px;
  }

  .search-modal .search-form__input,
  .search-modal .search-form__select {
    height: 48px;
    font-size: 16px;
    padding: 0 14px;
    border-radius: 6px;
  }

  .search-modal .search-form__input::placeholder {
    font-size: 16px;
  }

  .search-modal .search-form__tags {
    gap: 6px;
    justify-content: center;
  }

  .search-modal .widgetSearch__checkLabel {
    height: 30px;
    line-height: 28px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 30px;
  }

  .search-modal .search-form__actions {
    margin: 20px 0 50px;
  }

  .search-modal .search-form__submit-btn {
    width: 100%;
    max-width: 200px;
    height: 48px;
    font-size: 15px;
    border-radius: 48px;
  }

  /* SP固定検索ボタン（記事モード時のみ表示） */
  .search-fixed-submit {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 20px 20px 0 0;
    cursor: pointer;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.4s ease;
    -webkit-font-smoothing: antialiased;
  }

  .search-fixed-submit.is-visible {
    display: block;
  }

  .search-fixed-submit.is-shown {
    opacity: 1;
  }

  .search-fixed-submit:active {
    opacity: 0.7;
  }

  /* Search AI Banner */
  .search-ai-banner {
    width: 100vw;
    max-width: none;
    margin: 0;
    margin-left: calc(50% - 50vw);
    border-radius: 0;
    padding: 25px 25px 35px;
  }

  .search-ai-banner__inner {
    align-items: flex-start;
    gap: 10px;
  }

  .search-ai-banner__text {
    font-size: 13px;
  }

  .search-ai-banner__chara {
    width: 76px;
    right: 20px;
    bottom: -15px;
  }

  /* Fixed Buttons */
  .fixed-buttons {
    right: 0;
    bottom: 20px;
    align-items: center;
  }

  .quick-ai {
    width: 80px;
    margin-bottom: 15px;
  }

  .page-top {
    width: 40px;
  }
}

/* ============================================
   Sidebar Common Visual Styles
   (layout width/flex is managed by each page CSS)
   Selectors use .sidebar scope to work on all pages.
   For top page: specificity 0-2-0+ beats the all:revert
   rule (0-1-1) in top.css. Section heading overrides use
   0-4-0 to beat the base heading styles (0-3-1) in top.css.
   ============================================ */

/* Base resets for sidebar elements */
.sidebar {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  box-sizing: border-box;
}

.sidebar *,
.sidebar *::before,
.sidebar *::after {
  box-sizing: border-box;
}

.sidebar img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

.sidebar a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s;
}

.sidebar a:hover {
  opacity: 0.7;
}

.sidebar h2,
.sidebar h3,
.sidebar p {
  margin: 0;
  padding: 0;
}

/* --- Premium Banner --- */
.sidebar .sidebar-premium-banner {
  margin-bottom: clamp(49px, calc(35px + 1.823vw), 70px);
  background-color: #fff;
}

.sidebar .sidebar-premium-banner a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 14px;
  overflow: hidden;
}

/* --- Section Heading (Ranking) --- */
.sidebar .ranking-section .section-heading {
  text-align: left;
  margin-bottom: clamp(35px, calc(25px + 1.302vw), 50px);
  padding-bottom: clamp(21px, calc(15px + 0.781vw), 30px);
  border-bottom: 1px solid #A0A0A0;
}

.sidebar .ranking-section .section-heading .section-heading__en {
  display: inline;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(21px, calc(15px + 0.781vw), 30px);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-right: 10px;
}

.sidebar .ranking-section .section-heading .section-heading__ja {
  display: inline;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(11px, calc(8px + 0.417vw), 16px);
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-top: 0;
}

/* --- Section Heading (Reading Room) --- */
.sidebar .reading-room-section .section-heading {
  text-align: left;
  margin-bottom: clamp(35px, calc(25px + 1.302vw), 50px);
  padding-bottom: clamp(21px, calc(15px + 0.781vw), 30px);
  border-bottom: 1px solid #A0A0A0;
}

.sidebar .reading-room-section .section-heading .section-heading__en {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(21px, calc(15px + 0.781vw), 30px);
  line-height: 60px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
}

.sidebar .reading-room-section .section-heading .section-heading__ja {
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(11px, calc(8px + 0.417vw), 16px);
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-top: 0;
}

/* --- Ranking Section --- */
.sidebar .ranking-section {
  margin-bottom: 40px;
}

.sidebar .rank-item--first {
  position: relative;
  margin-bottom: 20px;
}

.sidebar .rank-item--first .rank-item__badge {
  position: absolute;
  top: -3px;
  left: 0;
  width: 40px;
  height: auto;
  z-index: 2;
}

.sidebar .rank-item--first .rank-item__image-link {
  display: block;
}

.sidebar .rank-item--first .rank-item__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.sidebar .rank-item--first .rank-item__title {
  font-size: clamp(11px, calc(8px + 0.417vw), 16px);
  line-height: 1.6;
  margin-top: clamp(8px, calc(6px + 0.313vw), 12px);
}

.sidebar .rank-item:not(.rank-item--first) {
  position: relative;
  display: flex;
  gap: 15px;
  padding: 15px 0;
}

.sidebar .rank-item:not(.rank-item--first) .rank-item__badge {
  position: absolute;
  top: 12px;
  left: 0;
  width: 28px;
  height: auto;
  z-index: 2;
}

.sidebar .rank-item:not(.rank-item--first) .rank-item__image-link {
  flex: 0 0 min(33%, 120px);
}

.sidebar .rank-item:not(.rank-item--first) .rank-item__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.sidebar .rank-item__body {
  flex: 1;
  min-width: 0;
}

.sidebar .rank-item__body .rank-item__title {
  font-size: 14px;
  line-height: 1.5;
}

.sidebar .rank-item__title a {
  color: inherit;
  text-decoration: none;
}

/* --- PR Banner --- */
.sidebar .pr-banner {
  background: #fff;
  padding: clamp(56px, calc(40px + 2.083vw), 80px) clamp(14px, calc(10px + 0.521vw), 20px);
  text-align: center;
  margin-bottom: clamp(28px, calc(20px + 1.042vw), 40px);
  /* PRバナー一時非表示 */
  display: none;
}

.sidebar .pr-banner a {
  color: var(--color-text-lighter);
  font-size: 14px;
}

/* --- Reading Room --- */
.sidebar .reading-room-section {
  margin-bottom: 60px;
}

.sidebar .reading-room-banners {
  display: flex;
  flex-direction: column;
  gap: clamp(25px, calc(18px + 0.911vw), 35px);
}

.sidebar .reading-room-banner {
  display: block;
  overflow: hidden;
}

.sidebar .reading-room-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.sidebar .reading-room-banner img[src=""] {
  min-height: 100px;
  background: #e8e0d8;
}

/* ============================================
   旧レイアウト（.l-wrapper）のブレークポイント統一
   親テーマ(THE THOR)は768pxで2カラムに切り替えるが、
   全ページ共通で1199px以下は1カラムに統一する。
   ※ 新レイアウトページ(single, archive等)では
     .l-wrapper自体がdisplay:noneのため影響なし
   ============================================ */
@media only screen and (min-width: 768px) and (max-width: 1199px) {
  .l-wrapper {
    flex-direction: column;
  }

  .l-wrapper .l-main {
    width: 100%;
    margin-right: 0;
  }

  .l-wrapper .l-sidebar {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
  }
}

/* ============================================
   Sidebar Responsive: Tablet (< 1200px)
   ============================================ */
@media (max-width: 1199px) {
  .sidebar .sidebar-premium-banner a {
    height: auto;
  }
}

/* ============================================
   Sidebar Responsive: Mobile (< 768px)
   ============================================ */
@media (max-width: 767px) {
  .sidebar .sidebar-premium-banner {
    margin-top: 30px;
    margin-bottom: 60px;
  }

  .sidebar .sidebar-premium-banner a {
    height: auto;
  }

  .sidebar .ranking-section {
    margin-bottom: 60px;
  }

  .sidebar .ranking-section .section-heading,
  .sidebar .reading-room-section .section-heading {
    margin-bottom: 40px;
    padding-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 15px;
  }

  .sidebar .ranking-section .section-heading .section-heading__en {
    font-size: 24px;
    line-height: 24px;
  }

  .sidebar .reading-room-section .section-heading .section-heading__en {
    font-size: 24px;
    /* line-height stays 60px from desktop rule (higher specificity in original) */
  }

  .sidebar .ranking-section .section-heading .section-heading__ja,
  .sidebar .reading-room-section .section-heading .section-heading__ja {
    font-size: 14px;
    line-height: 14px;
  }

  /* Ranking mobile: all items horizontal layout */
  .sidebar .rank-item--first {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    margin-bottom: 0;
  }

  .sidebar .rank-item--first .rank-item__badge {
    top: 12px;
    width: 28px;
  }

  .sidebar .rank-item--first .rank-item__image-link {
    flex: 0 0 120px;
  }

  .sidebar .rank-item--first .rank-item__image {
    width: 120px;
    height: 80px;
  }

  .sidebar .rank-item--first .rank-item__title,
  .sidebar .rank-item__body .rank-item__title {
    font-size: 12px;
    line-height: 25px;
    letter-spacing: 0.05em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sidebar .rank-item--first .rank-item__title {
    margin-top: 0;
  }

  .sidebar .reading-room-banners {
    margin-bottom: 30px;
  }
}

/* ============================================
   Session-type visibility
   ============================================ */
body.fms-session-type-2 .membership-section,
body.fms-session-type-2 .single-cta,
body.fms-session-type-2 .footer-nav-group--membership{
  display:none
}

body.fms-session-type-0 .membership-section,
body.fms-session-type-1 .membership-section,
body.fms-session-type-0 .single-cta,
body.fms-session-type-1 .single-cta,
body.fms-session-type-0 .footer-nav-group--membership,
body.fms-session-type-1 .footer-nav-group--membership{
  display:block
}

[data-role="juicer-popup"]{
  display: none !important;
}