/* らんど：ドラッグ＆ドロップ配置と拡張機能のCSS */

/* テンプレートパーツの包み要素はレイアウトに影響させない（Cocoonと同じDOM構造として扱う） */
.land-dnd .wp-site-blocks,
.land-dnd .wp-block-template-part { display: contents; }

/* ── デバイス別表示（Cocoonのブレークポイント：スマホ〜480px／タブレット〜834px） ── */
@media screen and (min-width: 835px) { .land-hide-pc { display: none !important; } }
@media screen and (min-width: 481px) and (max-width: 834px) { .land-hide-tab { display: none !important; } }
@media screen and (max-width: 480px) { .land-hide-sp { display: none !important; } }

/* ── ブロック下の余白 ── */
.land-mb-0  { margin-bottom: 0 !important; }
.land-mb-xs { margin-bottom: .5em !important; }
.land-mb-s  { margin-bottom: 1em !important; }
.land-mb-m  { margin-bottom: 2em !important; }
.land-mb-l  { margin-bottom: 3em !important; }
.land-mb-xl { margin-bottom: 5em !important; }

/* ── ヘッダー追従・透過 ── */
.land-header-sticky { position: sticky; top: 0; z-index: 100; }
.admin-bar .land-header-sticky { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .land-header-sticky { top: 46px; } }
@media screen and (max-width: 600px) { .admin-bar .land-header-sticky { top: 0; } }
.land-header-overlay { position: absolute; left: 0; right: 0; top: 0; z-index: 100; }
.admin-bar .land-header-overlay { top: 32px; }
.land-header-overlay .header-container,
.land-header-overlay .header,
.land-header-overlay .navi,
.land-header-overlay .navi-in > ul { background: transparent !important; }
.land-header-sticky.land-header-overlay { position: fixed; }

/* ── ブロックスタイル ── */
.wp-block-table.is-style-land-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wp-block-table.is-style-land-scroll table { min-width: 640px; }
.wp-block-table.is-style-land-scroll th,
.wp-block-table.is-style-land-scroll td { white-space: nowrap; }
.wp-block-group.is-style-land-card { background: #fff; border-radius: 10px; box-shadow: 0 2px 14px rgba(0,0,0,.09); padding: 1.5em; }
.wp-block-image.is-style-land-shadow img { border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }

/* ── A/Bテスト ── */
.land-ab-variant[hidden] { display: none !important; }

/* ── サイドバー枠が無いテンプレートは1カラム幅に ── */
.land-no-sidebar-block .main { width: 100%; }

/* ── パターン用：セクション内の見出しはCocoonの見出し装飾を外してフラットに ── */
.entry-content .land-section h2,
.entry-content .land-section h3,
.entry-content .land-section h4 { background: none; border: none; padding: 0; box-shadow: none; margin: 0 0 .8em; }
.entry-content .land-section h2::before,
.entry-content .land-section h2::after { display: none; }

/* ── らんど：シームレス遷移 ── */
.land-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100000; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, #7fd8ff, #ff9ad5, #ffe07a); box-shadow: 0 0 8px rgba(127,216,255,.7); }
.admin-bar .land-progress { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .land-progress { top: 46px; } }
#barba-persist-zone { position: relative; z-index: 9990; }
body.is-transitioning a { cursor: progress; }
@media (prefers-reduced-motion: reduce) { .land-progress { transition: none !important; } }

/* ── らんど：全画面モード ── */
body.land-fullscreen { background: var(--land-fs-bg, #fff) !important; color: var(--land-fs-text, #000) !important; }
body.land-fullscreen #header-container, body.land-fullscreen #carousel, body.land-fullscreen .notice-area, body.land-fullscreen .appeal,
body.land-fullscreen .recommended, body.land-fullscreen #content-top, body.land-fullscreen #content-bottom, body.land-fullscreen .breadcrumb,
body.land-fullscreen #sidebar, body.land-fullscreen #footer, body.land-fullscreen .date-tags, body.land-fullscreen .sns-share,
body.land-fullscreen .sns-follow, body.land-fullscreen .under-entry-content, body.land-fullscreen .entry-categories-tags,
body.land-fullscreen .footer-meta, body.land-fullscreen .mobile-menu-buttons, body.land-fullscreen .go-to-top, body.land-fullscreen #wpadminbar { display: none !important; }
body.land-fullscreen #container, body.land-fullscreen #content, body.land-fullscreen #content-in, body.land-fullscreen #main,
body.land-fullscreen .main, body.land-fullscreen .entry-content { width: 100% !important; max-width: 100% !important; margin: 0 !important;
  background: transparent !important; color: inherit !important; box-sizing: border-box; }
body.land-fullscreen #main { padding: clamp(15px, 3vw, 40px) !important; min-height: 100vh; border: none !important; box-shadow: none !important; }
body.land-fullscreen-notitle .entry-title, body.land-fullscreen-notitle .article-header { display: none !important; }
body.land-fullscreen-center .entry-content { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 80vh; }
.land-exit-btn { position: fixed; top: 20px; left: 20px; z-index: 10000; cursor: pointer; padding: 8px 15px; border-radius: 25px; font-size: 14px;
  background: rgba(0,0,0,.08); color: var(--land-fs-text, #000); border: 2px solid var(--land-fs-text, #000); transition: all .3s; }
.land-exit-btn:hover { background: var(--land-fs-text, #000); color: var(--land-fs-bg, #fff); }

/* ── らんど：View Transitions（「ぬるっと」切り替え）── */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--land-vt-ms, 280ms); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
::view-transition-group(land-hero) { animation-duration: calc(var(--land-vt-ms, 280ms) * 1.5); animation-timing-function: cubic-bezier(.2, .8, .2, 1); z-index: 50; }
::view-transition-old(land-hero), ::view-transition-new(land-hero) { height: 100%; object-fit: cover; }
/* 止めたままにしたいもの（音楽プレイヤー・チャット・ヘッダー）は別レイヤーにして、ちらつかせない */
.land-navi #dodo-aim-player { view-transition-name: land-player; }
.land-navi #dodo-aih-chat-widget { view-transition-name: land-chat; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* ── スマホのヘッダーメニュー：開いた子メニューが他の項目に重ならないように（アコーディオンが下に広がる）── */
@media screen and (max-width: 834px) {
  .navi-in .menu-mobile { display: flex; flex-wrap: wrap; }
  .navi-in .menu-mobile:has(> li.cmml-open), .navi-in:has(.cmml-open), .navi:has(.cmml-open) { height: auto !important; }
  .navi-in .menu-mobile > li.cmml-open { height: auto !important; max-height: none !important; display: flex !important; flex-direction: column; align-self: flex-start; }
  .navi-in .menu-mobile > li.cmml-open > a { height: 40px !important; flex: 0 0 40px; }
  .navi-in .menu-mobile > li.cmml-open > .sub-menu > li { height: 40px; }
  .navi-in .menu-mobile > li.cmml-open { flex: 0 0 100%; width: 100% !important; max-width: 100%; order: 0; }
  .navi-in .menu-mobile > li.cmml-open > .sub-menu {
    position: static !important; display: grid !important; grid-template-columns: 1fr 1fr; width: 100% !important;
    visibility: visible !important; opacity: 1 !important; transform: none !important; box-shadow: none;
  }
  .navi-in .menu-mobile > li.cmml-open > .sub-menu > li { width: auto !important; }
  .navi-in .menu-mobile > li.cmml-open > .sub-menu a { justify-content: center; }
}

/* 会員限定の案内 */
.land-members-only { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 1.5em 0; padding: 24px 16px; border: 1px dashed rgba(0,0,0,.2); border-radius: 12px; background: rgba(0,0,0,.03); text-align: center; }
.land-members-only__icon { font-size: 28px; line-height: 1; }
.land-members-only p { margin: 0 !important; }
.land-members-only__btn { display: inline-block; padding: 8px 22px; border-radius: 999px; background: #333; color: #fff !important; text-decoration: none !important; font-size: .9em; }
html.land-dark .land-members-only { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }
html.land-dark .land-members-only__btn { background: #e3e6ea; color: #111 !important; }
