/* ============================================================
   機種ページ専用スタイル（body.single-machine でスコープ限定）
   他ページの .container には影響しない
   ============================================================ */

/* コンテナのカード感を撤廃して全幅に解放 */
body.single-machine .container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* ページ背景 */
body.single-machine {
  background: var(--bg-body);
}

/* ヘッダー行: サムネ + タイトル + お気に入り */
body.single-machine .machine-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent-color);
}
/* サムネ＋判子をまとめる相対配置コンテナ */
body.single-machine .machine-header-thumb-wrap {
  position: relative;
  flex-shrink: 0;
}
body.single-machine .machine-header-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  background: var(--bg-card-hi);
}
body.single-machine .machine-header-thumb img.machine-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
}
body.single-machine article h1 {
  flex: 1;
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text-main);
  border: none;
  line-height: 1.35;
  word-break: break-word;
}
/* ===========================================================
   お気に入り = スムースSVGハート（トップページと統一）
   サムネ右上に重ねて配置。背景・枠なし、ハート単体。
   =========================================================== */
body.single-machine .machine-header-fav.fitted-switch-btn {
  position: absolute !important;
  top: -6px;
  right: -6px;
  margin: 0;
  width: 32px !important;
  height: 32px !important;
  padding: 0;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  z-index: 3;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.15s ease;
}

body.single-machine .machine-header-fav .label-text,
body.single-machine .machine-header-fav .toggle-switch {
  display: none;
}

body.single-machine .machine-header-fav .fav-heart {
  width: 26px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
  transition: filter 0.2s ease;
}
body.single-machine .machine-header-fav .fav-heart-path {
  fill: transparent;
  stroke: var(--idx-gold, #f5b800);
  stroke-width: 2;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

body.single-machine .machine-header-fav:hover {
  transform: scale(1.1) !important;
}
body.single-machine .machine-header-fav:hover .fav-heart-path {
  stroke: #ffd966;
  fill: rgba(245, 184, 0, 0.18);
}

body.single-machine .machine-header-fav.fitted-switch-btn.is-active {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
body.single-machine .machine-header-fav.is-active .fav-heart {
  filter: drop-shadow(0 0 5px rgba(220, 50, 50, 0.5)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}
body.single-machine .machine-header-fav.is-active .fav-heart-path {
  fill: #d9261b;
  stroke: #ffd966;
}

body.single-machine .machine-header-fav.animate-pop .fav-heart {
  animation: favHeartPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes favHeartPop {
  0%   { transform: scale(0.7); }
  35%  { transform: scale(1.4); }
  65%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  body.single-machine .machine-header-fav.animate-pop .fav-heart {
    animation: none;
  }
}

/* デスクトップでは少し余裕を持たせる */
@media (min-width: 768px) {
  body.single-machine .machine-header-row {
    padding: 14px 24px;
    gap: 16px;
  }
  body.single-machine .machine-header-thumb {
    width: 72px;
    height: 72px;
  }
  body.single-machine article h1 {
    font-size: 1.35rem;
  }
}

/* 本文エリア（3タブ共通パネル）。左右パディングを0にして横幅を最大活用 */
body.single-machine .entry-content {
  background: var(--bg-body);
  color: var(--text-main);
  padding: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ============ 3タブ（狙い目 / 解析情報 / 集計値） ============ */
body.single-machine .machine-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  margin: 4px 0 12px;
  background: var(--bg-body);
  border-bottom: 1px solid var(--line-gold-hi);
  position: sticky;
  top: 0;
  z-index: 5;
}

body.single-machine .machine-tab {
  flex: 1;
  appearance: none;
  background: transparent;
  color: var(--text-main);
  border: none;
  padding: 12px 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  margin-bottom: -1px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

body.single-machine .machine-tab-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
body.single-machine .machine-tab-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

body.single-machine .machine-tab:hover:not(.is-disabled):not(.is-active) {
  background: var(--bg-card-hi);
  color: var(--accent-color);
}

body.single-machine .machine-tab.is-active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

body.single-machine .machine-tab.is-disabled {
  cursor: not-allowed;
  color: rgba(236, 233, 223, 0.55);
  position: relative;
  overflow: visible;
}
/* 「準備中」札（ふだ）— 紙のお知らせがタブに貼ってある感じ */
body.single-machine .machine-tab.is-disabled::after {
  content: "準備中";
  position: absolute;
  top: -7px;
  right: 4px;
  transform: rotate(6deg);
  transform-origin: top right;
  padding: 1px 5px 2px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: #fff5c2;
  background: linear-gradient(180deg, #c8201a 0%, #9b1010 100%);
  border: 1px solid #4a0a05;
  box-shadow:
    1px 1px 0 rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 200, 150, 0.3);
  border-radius: 1px;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

body.single-machine .machine-tab-empty {
  color: var(--text-main);
  opacity: 0.6;
  text-align: center;
  padding: 32px 16px;
  font-size: 0.9rem;
}

/* ============ 解析情報アコーディオン（スマホ1画面俯瞰用） ============ */
body.single-machine #machine-panel-kaiseki {
  padding: 8px 0 24px;
}
body.single-machine .kaiseki-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 4px 12px 8px;
}
body.single-machine .kaiseki-toggle-all {
  appearance: none;
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--line-gold-hi);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1;
  letter-spacing: 0.04em;
}
body.single-machine .kaiseki-toggle-all:hover {
  background: var(--accent-color);
  color: #1a1408;
  border-color: var(--accent-color);
}
body.single-machine .kaiseki-toggle-all[data-state="open"] svg {
  transform: rotate(180deg);
}
body.single-machine .kaiseki-toggle-all svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

body.single-machine .kaiseki-accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

/* セクションは囲み枠なし。区切りは下線のみのフラットなリスト */
body.single-machine .kaiseki-section {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 184, 0, 0.14);
  border-radius: 0;
}
body.single-machine .kaiseki-section[open] {
  border-bottom-color: rgba(245, 184, 0, 0.28);
}

body.single-machine .kaiseki-section-title {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px 12px 36px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  position: relative;
  line-height: 1.3;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}
body.single-machine .kaiseki-section-title::-webkit-details-marker { display: none; }
body.single-machine .kaiseki-section-title::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  transform: translateY(-70%) rotate(-45deg);
  transition: transform 0.2s ease;
}
body.single-machine .kaiseki-section[open] > .kaiseki-section-title::before {
  transform: translateY(-30%) rotate(45deg);
}
body.single-machine .kaiseki-section[open] > .kaiseki-section-title {
  color: var(--accent-color);
  /* 開いた親→子がシームレスに繋がるよう背景ハイライト/下線は付けない */
}
body.single-machine .kaiseki-section-title:hover {
  background: var(--bg-card-hi);
}

body.single-machine .kaiseki-section-body {
  padding: 8px 4px 14px;
  font-size: 0.88rem;
  line-height: 1.65;
}

/* セクション内 h3 カテゴリ = 入れ子アコーディオン（折り畳み）。
   箱・左バーは排しつつ、明るい太字＋薄い区切り線で各カテゴリを目立たせる。
   左インデントは付けず（余白を排除）ほぼ左端から表示 */
body.single-machine .kaiseki-subsection {
  border: none;
  border-bottom: 1px solid rgba(245, 184, 0, 0.12);
  border-radius: 0;
  margin: 0;
  background: transparent;
}
body.single-machine .kaiseki-subsection:last-child {
  border-bottom: none;
}
body.single-machine .kaiseki-subsection-title {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 10px 26px 10px 4px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  user-select: none;
  transition: color 0.15s ease;
}
body.single-machine .kaiseki-subsection-title::-webkit-details-marker { display: none; }
/* 右端のシェブロン（開くと回転） */
body.single-machine .kaiseki-subsection-title::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid rgba(245, 184, 0, 0.7);
  border-bottom: 2px solid rgba(245, 184, 0, 0.7);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
body.single-machine .kaiseki-subsection[open] > .kaiseki-subsection-title::after {
  transform: translateY(-30%) rotate(225deg);
}
body.single-machine .kaiseki-subsection[open] > .kaiseki-subsection-title {
  color: var(--accent-color);
}
body.single-machine .kaiseki-subsection-body {
  padding: 0 0 8px 4px;  /* 本文はほぼ左端から全幅で使う（左の余白を排除） */
}

/* 本文インラインの自動目次(#toc_container=Table of Contents Plus)は、
   右下ハンバーガー目次に置き換えたため機種ページでは非表示。戻す時はこの1ブロック削除でOK */
body.single-machine #toc_container { display: none !important; }

/* ===== 機種ページ 目次ハンバーガー（右下固定・常時／狙い目・解析 共用） ===== */
body.single-machine .machine-toc-fab {
  position: fixed;
  right: 14px;
  bottom: 64px;            /* 既定: ボトムナビ(56px)のギリギリ上 */
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #1a1a1a;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
  z-index: 10010;          /* ボトムナビ(9999)より上に。重なってもタップがFABに届くように */
  cursor: pointer;
  transition: bottom 0.2s ease, transform 0.25s ease, opacity 0.25s ease;
}
/* 検索/50音パネル表示時は その上に逃がす */
body.single-machine .machine-toc-fab.is-panel-open { bottom: 132px; }
/* ボトムナビがスクロールで隠れても、ハンバーガーは消さず下端まで降りて表示継続 */
body.single-machine .machine-toc-fab.is-nav-hidden { bottom: 16px; }
/* 目次が空（会員ロック等で見出しが無い）の時だけ完全に隠す */
body.single-machine .machine-toc-fab.is-empty {
  transform: translateY(90px);
  opacity: 0;
  pointer-events: none;
}
/* チャットパネル表示中は目次ハンバーガー一式を隠す（送信ボタンと重なるのを防止） */
body.dc-chat-open .machine-toc-fab,
body.dc-chat-open .machine-toc-overlay,
body.dc-chat-open .machine-toc-drawer {
  display: none !important;
}
body.single-machine .machine-toc-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10011;
  opacity: 0; transition: opacity 0.2s ease;
}
body.single-machine .machine-toc-overlay.is-open { opacity: 1; }
body.single-machine .machine-toc-drawer {
  position: fixed;
  right: 12px; bottom: 70px;
  width: min(78vw, 280px);
  max-height: 60vh;
  background: var(--bg-card, #1c1c1c);
  border: 1px solid rgba(245, 184, 0, 0.4);
  border-radius: 12px;
  z-index: 10012;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.single-machine .machine-toc-drawer.is-open { transform: none; opacity: 1; }
/* 閉じている間は完全に消す（display:flex が [hidden] を上書きしてFABタップを
   横取りしていた不具合の修正）。overlayも同様。 */
body.single-machine .machine-toc-drawer[hidden],
body.single-machine .machine-toc-overlay[hidden] {
  display: none !important;
}
body.single-machine .machine-toc-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  font-weight: 700; color: var(--accent-color);
  border-bottom: 1px solid rgba(245, 184, 0, 0.2);
  flex-shrink: 0;
}
body.single-machine .machine-toc-close {
  background: none; border: none; color: var(--text-main);
  font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 4px;
}
body.single-machine .machine-toc-list { overflow-y: auto; padding: 4px 0 8px; }
/* chonborista式 全展開ネスト目次: 親=セクション(太字)＋子=サブ(インデント・常時表示) */
body.single-machine .machine-toc-sec {
  display: block; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  padding: 10px 16px 4px; font-size: 0.92rem; font-weight: 700;
  color: var(--text-main); line-height: 1.3;
}
body.single-machine .machine-toc-sec:first-child { padding-top: 4px; }
body.single-machine .machine-toc-sec:active { color: var(--accent-color); }
body.single-machine .machine-toc-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  padding: 6px 16px 6px 30px; font-size: 0.85rem; font-weight: 500;
  color: var(--text-sub, #cfcfcf); line-height: 1.35; position: relative;
}
/* サブ項目の手前に入れ子を示すマーカー */
body.single-machine .machine-toc-item::before {
  content: "・"; position: absolute; left: 18px; color: rgba(245, 184, 0, 0.6);
}
body.single-machine .machine-toc-item:active { color: var(--accent-color); }
/* h3 が（万一）details 化されず素のままの場合のフォールバック表示 */
body.single-machine .kaiseki-section-body > h3 {
  font-size: 0.92rem;
  margin: 14px 0 6px;
  padding-left: 8px;
  border-left: 3px solid var(--accent-color);
  line-height: 1.4;
}
body.single-machine .kaiseki-section-body h3::before { content: none; display: none; }
/* 表から抜き出した単一セルのタイトル（H4）。表の上の小見出しとして表示 */
body.single-machine .kaiseki-section-body h4 {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-color);
  margin: 12px 0 4px;
  line-height: 1.4;
}
body.single-machine .kaiseki-section-body p {
  margin: 6px 0;
  font-size: 0.85rem;
}
body.single-machine .kaiseki-section-body ul,
body.single-machine .kaiseki-section-body ol {
  margin: 4px 0 8px;
  padding-left: 1.2em;
}
body.single-machine .kaiseki-section-body li {
  margin: 2px 0;
  font-size: 0.85rem;
  line-height: 1.55;
}

/* テーブル: 横スクロール化＋コンパクト。
   折返すとセルが縦1文字ずつ崩れるので nowrap で整形を保ち、
   右端フェード(スクロールシャドウ)で「横スクロールできる」ことを示す */
body.single-machine .kaiseki-section-body table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 6px 0 10px;
  font-size: 0.78rem;
  /* スクロールシャドウ: 右にまだ続くと右端に影が出る（Lea Verou式） */
  background:
    linear-gradient(to right, var(--bg-card) 30%, rgba(20, 20, 20, 0)) left center,
    linear-gradient(to left, var(--bg-card) 30%, rgba(20, 20, 20, 0)) right center,
    radial-gradient(farthest-side at 0 50%, rgba(245, 184, 0, 0.5), rgba(0, 0, 0, 0)) left center,
    radial-gradient(farthest-side at 100% 50%, rgba(245, 184, 0, 0.5), rgba(0, 0, 0, 0)) right center;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}
/* スクロールバーも細く可視化（スクロール可能の手掛かり） */
body.single-machine .kaiseki-section-body table::-webkit-scrollbar { height: 6px; }
body.single-machine .kaiseki-section-body table::-webkit-scrollbar-thumb {
  background: rgba(245, 184, 0, 0.45);
  border-radius: 3px;
}
body.single-machine .kaiseki-section-body table th,
body.single-machine .kaiseki-section-body table td {
  padding: 5px 8px;
  border: 1px solid rgba(245, 184, 0, 0.18);
  white-space: nowrap;
}
body.single-machine .kaiseki-section-body table th {
  background: var(--bg-card-hi);
  color: var(--accent-color);
  font-weight: 700;
}

/* デスクトップでは少し余裕を持たせる */
@media (min-width: 768px) {
  body.single-machine .kaiseki-accordion {
    padding: 0 24px;
  }
  body.single-machine .kaiseki-section-title {
    font-size: 1.02rem;
    padding: 14px 16px 14px 40px;
  }
  body.single-machine .kaiseki-section-body {
    padding: 10px 20px 18px;
    font-size: 0.95rem;
  }
  body.single-machine .kaiseki-section-body table {
    display: table;
    width: auto;
    max-width: 100%;
    font-size: 0.9rem;
    background: none;
  }
}

/* ロックタブの🔒アイコン */
body.single-machine .machine-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

body.single-machine .machine-tab-lock-icon {
  opacity: 0.75;
  flex-shrink: 0;
}

body.single-machine .machine-tab.is-locked {
  color: var(--text-main);
  opacity: 0.85;
}

body.single-machine .machine-tab.is-locked:hover {
  background: var(--bg-card-hi);
  color: var(--accent-color);
  opacity: 1;
}

/* パネル内ロック表示（集計値タブ等） */
body.single-machine .machine-panel-lock {
  background: var(--bg-card);
  border: 1px solid var(--line-gold-hi);
  border-radius: 12px;
  padding: 40px 24px;
  margin: 16px;
  text-align: center;
  color: var(--text-main);
}

body.single-machine .machine-panel-lock-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 12px;
}

body.single-machine .machine-panel-lock h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--accent-color);
}

body.single-machine .machine-panel-lock p {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0 0 20px;
}

body.single-machine .machine-panel-lock-btn {
  background: var(--accent-color);
  color: #1a1a1a;
  border: none;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

body.single-machine .machine-panel-lock-btn:hover {
  background: var(--accent-hover);
}

/* ============================================================
   ログイン誘導モーダル "Vault of the Gods"
   アール: 黒×ゴールド／神殿モチーフ／ヴォルトダイヤル開錠
   ============================================================ */
.machine-login-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
}

.machine-login-modal[hidden] { display: none; }

.machine-login-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(245, 184, 0, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 80% 80% at 50% 100%, rgba(245, 184, 0, 0.05) 0%, transparent 70%),
    rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  animation: mlm-fade 0.4s ease-out;
}

/* ─── パネル本体 ─── */
.machine-login-modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background:
    linear-gradient(180deg, #181a22 0%, #0a0b10 100%);
  border: 1px solid rgba(245, 184, 0, 0.22);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.85),
    0 0 60px rgba(245, 184, 0, 0.06),
    inset 0 1px 0 rgba(245, 184, 0, 0.25);
  color: var(--text-main);
  animation: mlm-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── 上端ゴールドバー（シマー） ─── */
.machine-login-modal-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(245, 184, 0, 0.7) 18%,
    #fff5c2 50%,
    rgba(245, 184, 0, 0.7) 82%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: mlm-shimmer 4s linear infinite;
}

/* ─── 四隅のゴールド装飾（神殿の額縁感） ─── */
.mlm-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.mlm-corner::before,
.mlm-corner::after {
  content: "";
  position: absolute;
  background: var(--accent-color);
}
.mlm-corner::before { width: 14px; height: 1px; }
.mlm-corner::after  { width: 1px;  height: 14px; }

.mlm-corner--tl { top: 6px;    left: 6px; }
.mlm-corner--tl::before { top: 0; left: 0; }
.mlm-corner--tl::after  { top: 0; left: 0; }

.mlm-corner--tr { top: 6px;    right: 6px; }
.mlm-corner--tr::before { top: 0; right: 0; }
.mlm-corner--tr::after  { top: 0; right: 0; }

.mlm-corner--bl { bottom: 6px; left: 6px; }
.mlm-corner--bl::before { bottom: 0; left: 0; }
.mlm-corner--bl::after  { bottom: 0; left: 0; }

.mlm-corner--br { bottom: 6px; right: 6px; }
.mlm-corner--br::before { bottom: 0; right: 0; }
.mlm-corner--br::after  { bottom: 0; right: 0; }

/* ─── 内側コンテンツ ─── */
.machine-login-modal-inner {
  position: relative;
  padding: 38px 32px 26px;
  text-align: center;
}

/* ─── 閉じるボタン ─── */
.machine-login-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid rgba(245, 184, 0, 0.35);
  color: var(--accent-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.2s ease;
  z-index: 3;
}
.machine-login-modal-close:hover {
  background: var(--accent-color);
  color: #06070a;
  border-color: var(--accent-color);
  transform: rotate(90deg);
}

/* ─── ヴォルトダイヤルアイコン ─── */
.mlm-vault {
  width: 84px;
  height: 84px;
  margin: 4px auto 22px;
  position: relative;
}
.mlm-vault::after {
  content: "";
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle, rgba(245,184,0,0.18) 0%, transparent 65%);
  z-index: -1;
  animation: mlm-pulse 3s ease-in-out infinite;
}
.mlm-vault svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 12px rgba(245, 184, 0, 0.4));
}
.mlm-vault-ring {
  transform-origin: 50% 50%;
  animation: mlm-dial-spin 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ─── タイポグラフィ ─── */
.mlm-eyebrow {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 0.7rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin: 0 0 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0.92;
}
.mlm-eyebrow::before,
.mlm-eyebrow::after {
  content: "";
  height: 1px;
  width: 24px;
  background: linear-gradient(90deg, transparent, var(--accent-color));
}
.mlm-eyebrow::after {
  background: linear-gradient(90deg, var(--accent-color), transparent);
}
.mlm-eyebrow span {
  padding-bottom: 1px;
}

.mlm-title {
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: #f8f5ec;
  letter-spacing: 0.12em;
  line-height: 1.5;
  padding-left: 0;
  border: none;
}
/* グローバル h3::before（マゼンタバー）／h3 span（マゼンタハイライト）の打ち消し */
.mlm-title::before { content: none !important; display: none !important; }
.mlm-title span { background: none !important; padding: 0 !important; }
.mlm-title-accent {
  color: var(--accent-color) !important;
  text-shadow: 0 0 12px rgba(245, 184, 0, 0.4);
  padding: 0 2px !important;
}

.mlm-desc {
  font-size: 0.85rem;
  line-height: 1.75;
  color: rgba(236, 233, 223, 0.65);
  margin: 0 0 26px;
  font-feature-settings: "palt";
}

/* ─── アクション領域 ─── */
.mlm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.mlm-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 0;
  border: 1px solid transparent;
  overflow: hidden;
  letter-spacing: 0.05em;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease;
  font-family: inherit;
}
.mlm-btn-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  transition: width 0.25s ease;
}
.mlm-btn-icon { flex-shrink: 0; }
.mlm-btn:hover { transform: translateY(-1px); }
.mlm-btn:hover .mlm-btn-edge { width: 7px; }
.mlm-btn:active { transform: translateY(0); }

/* Discord ボタン */
.mlm-btn--discord {
  background: #1d2030;
  color: #d8defb;
  border-color: rgba(88, 101, 242, 0.45);
}
.mlm-btn--discord .mlm-btn-edge { background: #5865F2; }
.mlm-btn--discord:hover {
  background: #23273d;
  color: #fff;
  box-shadow:
    0 10px 22px rgba(88, 101, 242, 0.22),
    0 0 0 1px rgba(88, 101, 242, 0.6);
}

/* パスワードボタン（ゴールドフィル） */
.mlm-btn--password {
  background: linear-gradient(180deg, #ffd966 0%, #f5b800 55%, #d99a00 100%);
  color: #1a1408;
  border-color: #b88500;
  text-shadow: 0 1px 0 rgba(255, 245, 194, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.mlm-btn--password .mlm-btn-edge { background: rgba(255, 245, 194, 0.9); }
.mlm-btn--password:hover {
  background: linear-gradient(180deg, #fff0a8 0%, #ffd966 55%, #f5b800 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 12px 28px rgba(245, 184, 0, 0.38);
}

/* OR 分割線 */
.mlm-divider {
  display: flex;
  align-items: center;
  margin: 2px 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 0.7rem;
  color: rgba(245, 184, 0, 0.55);
  letter-spacing: 0.35em;
  font-weight: 500;
}
.mlm-divider::before,
.mlm-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 184, 0, 0.3), transparent);
}
.mlm-divider span { padding: 0 14px; }

/* ─── 脚注 ─── */
.mlm-note {
  font-size: 0.7rem;
  color: rgba(236, 233, 223, 0.5);
  margin: 18px 0 0;
  line-height: 1.7;
}
.mlm-note a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 184, 0, 0.35);
  padding-bottom: 1px;
  transition: all 0.15s ease;
}
.mlm-note a:hover {
  color: #fff5c2;
  border-bottom-color: #fff5c2;
}

/* ─── アニメーション ─── */
@keyframes mlm-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes mlm-rise {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
@keyframes mlm-shimmer {
  0%   { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}
@keyframes mlm-dial-spin {
  0%   { transform: rotate(-200deg); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: rotate(0deg); opacity: 1; }
}
@keyframes mlm-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.95; }
}

/* ─── モーションリダクション ─── */
@media (prefers-reduced-motion: reduce) {
  .machine-login-modal-panel,
  .machine-login-modal-backdrop,
  .mlm-vault-ring,
  .mlm-vault::after,
  .machine-login-modal-panel::before {
    animation: none !important;
  }
}

/* ─── スマホ調整 ─── */
@media (max-width: 480px) {
  .machine-login-modal-inner { padding: 32px 22px 22px; }
  .mlm-title { font-size: 1.25rem; }
  .mlm-vault { width: 72px; height: 72px; margin-bottom: 18px; }
}

/* デスクトップ (768px以上) */
@media (min-width: 768px) {
  body.single-machine .entry-content {
    padding: 0 24px 24px;
  }

  body.single-machine .machine-tabs {
    padding: 0 24px;
  }

  body.single-machine .machine-tab {
    flex: 0 0 auto;
    min-width: 140px;
    padding: 14px 20px;
    font-size: 1rem;
  }
}

/* --- 余白を極限まで削ったスイッチボタン --- */
.fitted-switch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0px;
  width: auto;
  height: auto;
  background-color: rgba(19,20,25,0.85);
  border: 1px solid var(--line-gold);
  border-radius: 8px;
  padding: 1px 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  -webkit-tap-highlight-color: transparent;
}

.fitted-switch-btn:hover {
  background-color: rgba(245,184,0,0.1);
  border-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.fitted-switch-btn.is-active {
  border-color: var(--accent-color);
  background-color: var(--accent-color);
}

/* --- アイコン部分 --- */
.bookmark-icon {
  width: 20px;
  height: 20px;
  stroke: #9ca3af;
  stroke-width: 2;
  fill: transparent;
  transition: all 0.3s ease;
  display: block;
}

.fitted-switch-btn.is-active .bookmark-icon {
  stroke: #f97316;
  fill: #f97316;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4);
  }

  100% {
    transform: scale(1);
  }
}

.animate-pop .bookmark-icon {
  animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- ラベルテキスト部分 --- */
.label-text {
  font-size: 9px;
  font-weight: 800;
  color: #9ca3af;
  user-select: none;
  line-height: 1;
  margin: 0px 0;
}

.fitted-switch-btn.is-active .label-text {
  color: #f97316;
}

/* --- スイッチ部分 --- */
.toggle-switch {
  position: relative;
  width: 24px;
  height: 14px;
  background-color: #e5e7eb;
  border-radius: 99px;
  transition: background-color 0.3s ease;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.fitted-switch-btn.is-active .toggle-switch {
  background-color: #f97316;
}

.fitted-switch-btn.is-active .toggle-switch::after {
  transform: translateX(10px);
}
