    /* X (Twitter) ライトモード風デザイン */
    * { box-sizing: border-box; }
    html {
      color: #231815;
      font-size: 1em;
      line-height: 1.4;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
      background-color: #E50B1E;
    }
    body {
      max-width: 440px;
      min-height: 100vh;
      min-height: 100dvh;
      margin: 0 auto;
      padding: 14px;
      padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
      font-family: inherit;
      background: var(--bg);
      color: var(--text);
    }

    :root{
      --cell: 40px;   /* 440px幅内で8×8が収まる */
      --gap: 6px;
      --border: 1px;
      --vv-bottom-gap: 0px;
      --pseudo-kb-extend: 0px;

      --bg: #E50B1E;
      --panel: #FFFFFF;
      --text: #231815;
      --muted: #6E625F;
      --accent: #E60012;
      --black: #530000;
      --cellbg: #FFF5F7;
      --hi: rgba(230, 0, 18, 0.12);
      --border-color: #EED9DC;
    }

    .wrap{
      width: 100%;
      margin: 0 auto;
      display: grid;
      gap: 12px;
    }
    header{
      display:flex;
      align-items:baseline;
      justify-content:space-between;
      gap:12px;
    }
    h1{
      margin:0;
      font-size: 20px;
      font-weight: 700;
      letter-spacing: -.01em;
    }
    .status{
      font-size: 13px;
      color: var(--muted);
      white-space: nowrap;
      font-weight: 400;
    }

    .panel{
      background: var(--panel);
      border-radius: 16px;
      padding: 16px;
      border: 1px solid var(--border-color);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      transition: box-shadow 0.2s ease;
    }

    .grid{
      display:grid;
      gap: var(--gap);
      justify-content: center;
      touch-action: manipulation;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
    }

    .cell{
      position: relative;
      border-radius: 8px;
      overflow: hidden;
      background: var(--cellbg);
      border: var(--border) solid var(--border-color);
      display:flex;
      align-items:center;
      justify-content:center;
      transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
    }
    .cell.highlight{
      border-color: var(--accent);
      background: rgba(230, 0, 18, 0.08);
      box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.2);
    }
    .cell.is-current {
      box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.34);
      border-color: var(--accent);
    }
    @media (max-width: 600px) {
      .cell.is-current {
        background: rgba(230, 0, 18, 0.18);
        box-shadow:
          0 0 0 4px rgba(230, 0, 18, 0.65),
          0 0 0 1px rgba(255, 255, 255, 0.7) inset,
          0 10px 18px rgba(15, 20, 25, 0.14);
      }
    }
    .cell.black{
      background: #530000;
      border-color: #530000;
    }

    .cell input{
      width: 100%;
      height: 100%;
      border: 0;
      outline: 0;
      background: transparent;
      color: var(--text);
      text-align: center;
      font-size: 20px;
      font-weight: 750;
      letter-spacing: .02em;
      caret-color: var(--accent);
      -webkit-appearance: none;
      appearance: none;
      position: relative;
      z-index: 2;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
    }
    .cell input:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: -2px;
    }
    .cell.black input{ display:none; }

    .clue-num{
      position: absolute;
      top: 3px;
      left: 4px;
      font-size: 10px;
      font-weight: 700;
      color: var(--muted);
      line-height: 1;
      pointer-events: none;
      z-index: 1;
    }
    .pickup{
      position:absolute;
      bottom: 4px;
      right: 4px;
      font-size: 9px;
      color: #FFFFFF;
      background: var(--accent);
      border: none;
      padding: 1px 5px;
      border-radius: 999px;
      line-height: 1;
      pointer-events:none;
      font-weight: 600;
      opacity: 0.75;
      z-index: 1;
    }
    .cell.filled .pickup{
      opacity: 0.25;
    }

    .answer{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap: 10px;
    }
    .answer .label{
      color: var(--muted);
      font-size: 10px;
    }
    .answer .value{
      font-size: 18px;
      font-weight: 700;
      letter-spacing: .14em;
      padding: 8px 12px;
      border-radius: 8px;
      background: rgba(230, 0, 18, 0.08);
      border: 1px solid rgba(230, 0, 18, 0.3);
      min-width: 120px;
      text-align:center;
      color: var(--accent);
    }

    .current-hint{
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .current-hint .label{
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }
    .current-hint-text{
      font-size: 15px;
      line-height: 1.55;
      color: var(--text);
      min-height: 1.55em;
    }
    .current-hint-note{
      margin-top: 4px;
      font-size: 11px;
      color: var(--muted);
    }

    /* 盤面＋合言葉をスクロール時に画面上部にまとめて固定 */
    .crossword-sticky-stack {
      position: sticky;
      top: 0;
      z-index: 5;
      display: grid;
      gap: 12px;
      background: var(--bg);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    /* SP: 選択中のヒントを擬似キーボードの直上に固定。キーボード展開時のみ表示 */
    @media (max-width: 600px) {
      body.pseudo-keyboard-sp .current-hint-panel {
        position: fixed;
        bottom: 232px;
        left: 50%;
        transform: translateX(-50%) translateY(env(safe-area-inset-bottom, 0px));
        width: calc(100% - 28px);
        max-width: 440px;
        margin: 0;
        z-index: 19;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
        border-radius: 16px;
        visibility: hidden;
        pointer-events: none;
      }
      body.pseudo-keyboard-sp.pseudo-keyboard-expanded .current-hint-panel {
        visibility: visible;
        pointer-events: auto;
      }
    }

    .dummy-hints{
      color: var(--text);
      font-size: 15px;
      line-height: 1.6;
    }
    .dummy-hints ul{
      margin: 0 0 4px 0;
      padding-left: 1.2em;
    }
    .dummy-hints li{
      margin-bottom: 4px;
    }
    .dummy-hints li.is-active{
      background: rgba(230, 0, 18, 0.08);
      border-left: 3px solid var(--accent);
      padding-left: 0.6em;
    }

    .accordion{
      border: 1px solid var(--border-color);
      border-radius: 12px;
      background: var(--panel);
      overflow: hidden;
    }
    .accordion + .accordion{ margin-top: 10px; }
    .accordion summary{
      list-style: none;
      cursor: pointer;
      padding: 10px 12px;
      font-weight: 700;
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      user-select: none;
    }
    .accordion summary::-webkit-details-marker{ display: none; }
    .accordion summary::after{
      content: "▾";
      color: var(--muted);
      font-size: 14px;
      line-height: 1;
    }
    .accordion[open] summary::after{ content: "▴"; }
    .accordion ul{
      margin: 0;
      padding: 10px 12px 12px 1.4em;
      border-top: 1px solid var(--border-color);
      background: var(--panel);
    }

    /* 擬似キーボード（SPのみ）出し入れ可能 */
    .pseudo-keyboard {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 20;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
    }
    @media (max-width: 600px) {
      body.pseudo-keyboard-sp .pseudo-keyboard {
        display: flex;
        flex-direction: column;
        padding-bottom: var(--pseudo-kb-extend);
        background: #dddde2;
        /* インアプリWebViewで fixed の bottom:0 がセーフエリア上に取られるとき、全体を保護エリア分だけ下げる */
        transform: translateY(env(safe-area-inset-bottom, 0px));
      }
      /* キーボード下のギャップ埋め帯: 通常は下へ隠し、展開時のみ引き上げる */
      body.pseudo-keyboard-sp .pseudo-keyboard::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: calc(max(120px, env(safe-area-inset-bottom)) + var(--vv-bottom-gap));
        background: #dddde2;
        pointer-events: none;
        transform: translateY(0);
        opacity: 1;
      }
      body.pseudo-keyboard-sp .wrap {
        padding-bottom: calc(48px + var(--vv-bottom-gap) + env(safe-area-inset-bottom, 0px));
      }
      body.pseudo-keyboard-sp.pseudo-keyboard-expanded .wrap {
        padding-bottom: calc(322px + var(--vv-bottom-gap) + env(safe-area-inset-bottom, 0px));
      }
    }
    .pseudo-keyboard-tab {
      flex-shrink: 0;
      height: 40px;
      width: 100%;
      padding: 0 12px;
      padding-bottom: calc(max(4px, var(--vv-bottom-gap)));
      background: #dddde2;
      border: 0;
      border-top: 1px solid rgba(0,0,0,0.06);
      -webkit-appearance: none;
      appearance: none;
      box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
    }
    .pseudo-keyboard-tab:active {
      background: #cccbd2;
    }
    .pseudo-keyboard-tab-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      line-height: 1;
      color: var(--muted);
    }
    .pseudo-keyboard-tab-hide {
      display: none;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }
    body.pseudo-keyboard-expanded .pseudo-keyboard-tab-show {
      display: none;
    }
    body.pseudo-keyboard-expanded .pseudo-keyboard-tab-hide {
      display: inline-flex;
      font-size: 12px;
      font-weight: 500;
    }
    .pseudo-keyboard-body {
      display: none;
      padding: 5px 6px calc(max(8px, var(--vv-bottom-gap)));
      background: #dddde2;
      border-top: 1px solid rgba(0,0,0,0.04);
      box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    }
    body.pseudo-keyboard-expanded .pseudo-keyboard-body {
      display: block;
    }
    .pseudo-keyboard-body-row {
      display: flex;
      align-items: stretch;
      justify-content: center;
      gap: 6px;
      width: 100%;
      max-width: 380px;
      margin: 0 auto;
    }
    .pseudo-keyboard-inner {
      flex: 0 0 250px;
      min-width: 0;
    }
    .keyboard-answer-col {
      display: flex;
      flex-direction: column;
      justify-content: stretch;
      flex-shrink: 0;
      width: 56px;
    }
    .btn-answer {
      flex: 1;
      min-height: 0;
      min-width: 56px;
      padding: 8px 4px;
      font-size: 17px;
      font-weight: 700;
      color: #fff;
      background: linear-gradient(180deg, #E60012 0%, #C40010 100%);
      border: none;
      border-radius: 8px;
      cursor: pointer;
      box-shadow: 0 2px 4px rgba(230, 0, 18, 0.3);
      transition: transform 0.1s ease, box-shadow 0.1s ease;
      writing-mode: vertical-rl;
      text-orientation: mixed;
      letter-spacing: 0.08em;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    /* 合言葉エリア用の回答ボタン配置（ui-verify と同一レイアウト） */
    .panel.answer .answer-actions {
      margin-top: 4px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    /* 合言葉パネルだけ上下の余白を詰める（見た目に分かるレベルで） */
    .crossword-sticky-stack .panel.answer{
      padding-top: 8px;
      padding-bottom: 8px;
    }
    .crossword-sticky-stack .panel.answer .answer-actions{
      margin-top: 2px;
    }
    .panel.answer .answer-actions .value {
      flex: 1;
      min-width: 0;
    }
    .panel.answer .btn-answer {
      flex: 0 0 auto;
      min-width: auto;
      padding: 4px 10px;
      font-size: 14px;
      writing-mode: horizontal-tb;
      letter-spacing: 0.08em;
    }
    .btn-answer:hover {
      box-shadow: 0 3px 8px rgba(230, 0, 18, 0.4);
    }
    .btn-answer:active {
      transform: translateY(1px);
      box-shadow: 0 1px 2px rgba(230, 0, 18, 0.3);
    }
    .btn-answer:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    /* 回答候補ポップアップ */
    .answer-choices {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.35);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 30;
    }
    .answer-choices.is-open {
      display: flex;
    }
    .answer-choices-inner {
      width: calc(100% - 40px);
      max-width: 360px;
      background: #fff;
      border-radius: 16px;
      padding: 16px;
      box-shadow: 0 12px 32px rgba(15, 20, 25, 0.35);
    }
    .answer-choices-title {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 8px;
    }
    .answer-choices-note {
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 12px;
      line-height: 1.4;
    }
    .answer-choices-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .answer-choice-btn {
      width: 100%;
      padding: 10px 12px;
      border-radius: 999px;
      border: 1px solid var(--border-color);
      background: #FFF5F7;
      text-align: left;
      font-size: 14px;
      cursor: pointer;
    }
    .answer-choice-btn:active {
      background: #F7E3E7;
    }
    /* PC用フローティング回答ボタン */
    .fab-answer {
      position: fixed;
      right: 16px;
      bottom: 16px;
      z-index: 25;
      padding: 12px 14px;
      border: none;
      border-radius: 999px;
      background: linear-gradient(180deg, #E60012 0%, #C40010 100%);
      color: #fff;
      font-size: 14px;
      font-weight: 800;
      letter-spacing: 0.02em;
      cursor: pointer;
      box-shadow: 0 10px 22px rgba(230, 0, 18, 0.32);
    }
    .fab-answer:active { transform: translateY(1px); }
    .fab-answer:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 3px;
    }
    @media (max-width: 600px) {
      .fab-answer { display: none; }
    }
    .pseudo-keyboard-row {
      display: flex;
      justify-content: flex-start;
      align-items: stretch;
      gap: 5px;
      margin-bottom: 5px;
      width: 100%;
    }
    /* 通常行（3キー想定） */
    .pseudo-keyboard-row:last-child { margin-bottom: 0; }
    .pseudo-keyboard .flick-key {
      touch-action: none;
      height: 40px;
      padding: 0;
      font-size: 0;
      color: var(--text);
      background: #fff;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
      -webkit-tap-highlight-color: transparent;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 1.5px 0 #b8b8be, 0 2px 4px rgba(0,0,0,0.06);
      transition: box-shadow 0.06s ease, transform 0.06s ease, background 0.06s ease;
      flex: 0 0 64px;
      max-width: 64px;
    }
    .pseudo-keyboard .flick-key:active {
      transform: translateY(1px);
      box-shadow: 0 0.5px 0 #b8b8be, 0 1px 2px rgba(0,0,0,0.08);
      background: #f2f2f5;
    }
    .pseudo-keyboard .flick-key:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .pseudo-keyboard .flick-key-main {
      font-size: 22px;
      font-weight: 600;
      line-height: 1;
      letter-spacing: -0.02em;
    }
    .pseudo-keyboard .flick-key-main .flick-key-sub {
      display: block;
      font-size: 9px;
      line-height: 1;
      margin-left: 0;
      margin-top: -1px;
      opacity: 0.85;
    }
    .pseudo-keyboard .flick-key-main-wa .flick-key-sub {
      transform: translateX(10px);
    }
    .pseudo-keyboard .flick-key.key-3 { width: auto; max-width: none; }
    .pseudo-keyboard .flick-key.key-1 { width: auto; max-width: none; }
    .pseudo-keyboard-row-wa .flick-key[data-action="modifier"] {
      background: #b8b8c0;
      color: #374151;
      font-size: 14px;
      font-weight: 600;
      box-shadow: 0 1.5px 0 #9a9aa0, 0 2px 4px rgba(0,0,0,0.06);
    }
    .pseudo-keyboard-row-wa .flick-key[data-action="modifier"]:active {
      box-shadow: 0 0.5px 0 #9a9aa0, 0 1px 2px rgba(0,0,0,0.08);
      background: #a8a8b0;
    }
    .pseudo-keyboard-row-wa .flick-key[data-action="back"] {
      background: linear-gradient(180deg, #E9414F 0%, #C40010 100%);
      color: #fff;
      font-size: 18px;
      font-weight: 600;
      box-shadow: 0 1.5px 0 #99000D, 0 2px 4px rgba(230, 0, 18, 0.2);
    }
    .pseudo-keyboard-row-wa .flick-key[data-action="back"]:active {
      box-shadow: 0 0.5px 0 #99000D, 0 1px 2px rgba(230, 0, 18, 0.15);
    }
    .pseudo-keyboard .flick-key-sub {
      font-size: 10px;
      opacity: 0.85;
      margin-left: 1px;
    }

    /* フリック確定時の一瞬表示: 長押し候補と同じ 64×40・同位置（JS で座標指定）
       実キー(#fff)より少しだけ明るいライトグレー（テーマ上書きされにくいよう body 付き） */
    body .flick-flick-pop {
      position: fixed;
      box-sizing: border-box;
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
      z-index: 46;
      color: var(--text);
      background: #f2f2f6;
      border: none;
      border-radius: 6px;
      font-size: 22px;
      font-weight: 600;
      line-height: 1;
      letter-spacing: -0.02em;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 1.5px 0 #bfc0c8,
        0 2px 8px rgba(15, 20, 25, 0.10);
      animation: flickFlickKeyPop 0.32s ease-out forwards;
    }
    @keyframes flickFlickKeyPop {
      0% {
        opacity: 0;
        transform: scale(0.88);
      }
      45% {
        opacity: 1;
        transform: scale(1.02);
      }
      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

    /* 長押し: 擬似キーボードの .flick-key（64×40）と同サイズ・行の gap:5px 相当の間隔で十字配置 */
    .flick-longpress-overlay {
      position: fixed;
      inset: 0;
      z-index: 45;
      pointer-events: none;
    }
    .flick-longpress-hub {
      position: fixed;
      transform: translate(-50%, -50%);
      width: 0;
      height: 0;
      pointer-events: none;
    }
    body .flick-longpress-overlay .flick-longpress-seg {
      position: absolute;
      box-sizing: border-box;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text);
      background: #f4f4f8;
      border: none;
      border-radius: 6px;
      font-size: 22px;
      font-weight: 600;
      line-height: 1;
      letter-spacing: -0.02em;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 1.5px 0 #c7c7cf,
        0 2px 6px rgba(15, 20, 25, 0.08);
      transition: background 0.08s ease, box-shadow 0.08s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .flick-longpress-seg:not(.flick-longpress-center) {
      z-index: 1;
    }
    body .flick-longpress-overlay .flick-longpress-seg:not(.flick-longpress-center).is-active {
      background: #e9e9ee;
      box-shadow:
        0 0 0 2px var(--accent),
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 1px 0 #b8b8c0,
        0 2px 10px rgba(15, 20, 25, 0.12);
    }
    .flick-longpress-center {
      z-index: 3;
    }
    body .flick-longpress-overlay .flick-longpress-center.is-active {
      background: #e9e9ee;
      box-shadow:
        0 0 0 2px var(--accent),
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 1px 0 #b8b8c0,
        0 2px 10px rgba(15, 20, 25, 0.12);
    }
    @media (prefers-reduced-motion: reduce) {
      body .flick-flick-pop { animation: none; }
      body .flick-longpress-overlay .flick-longpress-seg {
        transition: none;
      }
      body .flick-longpress-overlay .flick-longpress-seg.is-active {
        transform: none;
      }
    }

    /* SP最適化：幅が狭い端末ならセルを縮める */
    @media (max-width: 390px){
      :root{ --cell: 36px; --gap: 5px; }
      .cell input{ font-size: 18px; }
    }
    @media (max-width: 350px){
      :root{ --cell: 34px; --gap: 4px; }
      .cell input{ font-size: 17px; }
    }

    @media (prefers-reduced-motion: reduce) {
      .cell, .panel, .pseudo-keyboard .flick-key {
        transition: none;
      }
      .pseudo-keyboard .flick-key:active,
      .pseudo-keyboard-row-wa .flick-key[data-action="back"]:active {
        transform: none;
      }
    }

    /* 初回アクセス時 KV モーダル */
    .kv-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      min-height: 100vh;
      min-height: -webkit-fill-available;
      display: none;
      align-items: center;
      justify-content: center;
      padding-bottom: env(safe-area-inset-bottom, 0px);
      box-sizing: border-box;
      background: rgba(0, 0, 0, 0.68);
      z-index: 60;
    }
    .kv-modal-overlay.is-visible {
      display: flex;
    }
    /* インアプリWebViewで safe-area 外がネイティブ透過になる端末向け（オーバーレイと同色） */
    .kv-modal-overlay.is-visible::after {
      content: "";
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      height: env(safe-area-inset-bottom, 0px);
      background: rgba(0, 0, 0, 0.68);
      z-index: 61;
      pointer-events: none;
    }
    .kv-modal-inner {
      width: calc(100% - 64px);
      max-width: 360px;
      border-radius: 24px;
      padding: 0;
      background: transparent;
      box-shadow: none;
      text-align: center;
      color: #231815;
    }
    .kv-modal-img {
      display: block;
      width: 100%;
      height: auto;
      box-shadow: 0 18px 40px rgba(15, 20, 25, 0.45);
    }
    .kv-modal-title {
      margin: 12px 0 4px;
      font-size: 22px;
      font-weight: 800;
      letter-spacing: 0.16em;
      color: #FFFFFF;
      text-shadow: 0 2px 4px rgba(0,0,0,0.35);
    }
    .kv-modal-date {
      margin: 0 0 4px;
      font-size: 18px;
      font-weight: 700;
      color: #FFFFFF;
      text-shadow: 0 2px 4px rgba(0,0,0,0.35);
    }
    .kv-modal-caption {
      margin-top: 2px;
      font-size: 11px;
      color: #536471;
    }
    @media (max-width: 390px) {
      .kv-modal-inner {
        padding: 20px 16px 16px;
      }
      .kv-modal-title {
        font-size: 20px;
      }
      .kv-modal-date {
        font-size: 14px;
      }
    }

    /* コピーライトフッター */
    .site-footer {
      text-align: center;
      padding: 2px 0;
      font-size: 10px;
      color: rgba(255, 255, 255, 0.6);
      letter-spacing: 0.02em;
    }
    .site-footer-terms-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 6px;
      padding: 0;
      border: none;
      background: none;
      color: #ffffff;
      font-weight: bold;
      font-size: 12px;
      text-decoration: underline;
      text-underline-offset: 2px;
      cursor: pointer;
    }
    .site-footer-terms-link:focus-visible {
      outline: 2px solid rgba(255, 255, 255, 0.9);
      outline-offset: 2px;
      border-radius: 4px;
    }
    .site-footer-copy {
      line-height: 1.4;
    }
    @media (max-width: 600px) {
      /* Xアプリ内ブラウザで最下部が隠れるケース向けに、フッター下にも埋め帯を作る */
      body.pseudo-keyboard-sp .site-footer::after {
        content: "";
        display: block;
        height: calc(56px + var(--vv-bottom-gap) + env(safe-area-inset-bottom, 0px));
      }
      body.pseudo-keyboard-sp.pseudo-keyboard-expanded .site-footer::after {
        height: calc(322px + var(--vv-bottom-gap) + env(safe-area-inset-bottom, 0px));
      }
    }

    .terms-modal-overlay {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.7);
      z-index: 70;
      padding: 16px;
    }
    .terms-modal-overlay.is-open {
      display: flex;
    }
    body.terms-modal-open {
      overflow: hidden;
    }
    .terms-modal-inner {
      width: min(100%, 440px);
      max-height: min(90vh, 720px);
      background: #fff;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 20px 48px rgba(15, 20, 25, 0.42);
      display: flex;
      flex-direction: column;
    }
    .terms-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border-bottom: 1px solid #EED9DC;
    }
    .terms-modal-title {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      color: #231815;
    }
    .terms-modal-close {
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 999px;
      background: #F2F2F2;
      color: #231815;
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
    }
    .terms-modal-close:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .terms-modal-body {
      padding: 12px 14px 16px;
      overflow-y: scroll;
      color: #231815;
      font-size: 12px;
      line-height: 1.7;
      /* スクロールバーを常時表示（webkit系） */
      scrollbar-width: thin;
      scrollbar-color: #D9A0A8 #F5EBEC;
    }
    .terms-modal-body::-webkit-scrollbar {
      width: 6px;
    }
    .terms-modal-body::-webkit-scrollbar-track {
      background: #F5EBEC;
      border-radius: 999px;
    }
    .terms-modal-body::-webkit-scrollbar-thumb {
      background: #D9A0A8;
      border-radius: 999px;
    }
    .terms-modal-body::-webkit-scrollbar-thumb:hover {
      background: #C0707A;
    }
    .terms-modal-body p {
      margin: 0 0 10px;
    }
    .terms-modal-body p:last-child {
      margin-bottom: 0;
    }

    /* ビデオモーダル */
    .video-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.65); /* 透過率を調整 */
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 100;
      padding: 20px; /* 余白を追加 */
    }
    .video-modal-overlay.is-open {
      display: flex;
    }
    .video-modal-inner {
      position: relative;
      width: 100%;
      max-width: 800px;
      aspect-ratio: 16 / 9;
      background: #000;
      border-radius: 12px;
      overflow: visible; /* ボタンを外に出せるよう変更 */
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    }
    .video-modal-close {
      position: absolute;
      top: -44px; /* 動画の少し上に配置 */
      right: -10px;
      width: 44px;
      height: 44px;
      border: none;
      background: rgba(255, 255, 255, 0.15);
      color: #fff;
      font-size: 32px;
      line-height: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 101;
      border-radius: 50%;
      transition: background 0.2s;
    }
    .video-modal-close:hover {
      background: rgba(255, 255, 255, 0.3);
    }
    .video-container {
      width: 100%;
      height: 100%;
    }
    .video-container iframe {
      width: 100%;
      height: 100%;
      border: none;
    }

    /* ヒント内の動画リンク */
    .video-link {
      color: #E60012;
      font-weight: 700;
      text-decoration: underline;
      text-underline-offset: 3px;
      transition: opacity 0.2s;
    }
    .video-link:hover {
      opacity: 0.7;
    }
    .video-link::before {
      content: "▶";
      font-size: 0.85em;
      margin-right: 3px;
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    @media (max-width: 600px) {
      .video-modal-close {
        top: 2px;
        right: 4px;
        background: rgba(0, 0, 0, 0.4);
        width: 36px;
        height: 36px;
        font-size: 24px;
      }
      .video-modal-inner {
        aspect-ratio: auto;
        height: auto;
        max-height: 80vh;
      }
      .video-container {
        aspect-ratio: 16 / 9;
      }
    }
  
