.share{position:relative;display:inline-flex;flex-direction:column;align-items:flex-start;gap:6px;font-family:system-ui,sans-serif}
.share-toggle{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:7px 16px;border:1px solid #d8cbbd;border-radius:99px;background:#fffaf2;color:#2b2520;font:600 14px/1.4 system-ui,sans-serif;cursor:pointer;white-space:nowrap}
.share-toggle:hover,.share-toggle[aria-expanded=true]{background:#f8e4dc;border-color:#b83e29;color:#a12f1e}
.share-toggle:focus-visible,.share-option:focus-visible{outline:3px solid #a83c28;outline-offset:2px}
.share-icon{display:block;flex:none;width:16px;height:16px}
/* 動画のすぐ下の「共有」（data-share-variant="primary"）：朱の塗りの大きなボタン。額はボタンに置かない（条件が書けない）。 */
.share-primary .share-toggle{gap:8px;min-height:48px;padding:0 22px 0 18px;border:0;background:#bc3e27;color:#fff;font:750 16px/1 system-ui,sans-serif;box-shadow:0 2px 10px rgba(188,62,39,.28)}
.share-primary .share-toggle:hover,.share-primary .share-toggle[aria-expanded=true]{background:#a92c16;color:#fff}
.share-primary .share-icon{width:20px;height:20px}
.share-seal{display:inline-flex;align-items:center;flex:none;height:22px;padding:0 8px;border-radius:99px;background:#bc3e27;color:#fff;font:800 12px/1 system-ui,sans-serif;white-space:nowrap}
/* 共有の一覧のいちばん上：条件の名札＋額のシール（1 行。長いときは名札が折り返す）。 */
.share-terms{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 6px;padding:7px 8px 7px 12px;border-radius:12px;background:#f8e4dc;color:#4a4038;font:700 13px/1.4 system-ui,sans-serif}
.share-terms-list{margin-bottom:4px}
.share-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:20;width:min(372px,calc(100vw - 32px));padding:10px 8px;border:1px solid #e3d8ca;border-radius:16px;background:#fffdf8;box-shadow:0 12px 32px rgba(40,30,20,.18)}
.share-pop[hidden]{display:none}
/* 行き先の格子：絵の下に名前。幅に合わせて 4 列前後（吹き出し・下のシートは 4 列）。押せる所は高さ 64px。 */
.share-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:2px}
.share-option{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:5px;min-width:0;min-height:64px;margin:0;padding:7px 0 6px;border:0;border-radius:12px;background:transparent;color:#2b2520;font:600 12px/1.25 system-ui,sans-serif;letter-spacing:-.01em;text-align:center;text-decoration:none;cursor:pointer;box-shadow:none}
.share-option>span:last-child{max-width:100%;overflow-wrap:anywhere}
.share-option:hover{background:#f8e4dc}
.share-mark{display:block;flex:none;width:36px;height:36px}
.share-mark svg{display:block;width:100%;height:100%}
/* 端末の共有（スマホで navigator.share があるとき）は先頭に横いっぱいの大きなボタン。PC（指でない端末）ではほかと同じ並びの 1 つのまま。 */
@media(pointer:coarse){
.share-option[data-share-channel=native]{grid-column:1/-1;flex-direction:row;justify-content:center;gap:8px;min-height:48px;margin-bottom:4px;padding:0 14px;border-radius:99px;background:#bc3e27;color:#fff;font-size:14px}
.share-option[data-share-channel=native]:hover{background:#a92c16}
.share-option[data-share-channel=native] .share-mark{width:26px;height:26px}
}
.share-status{font-size:13px;line-height:1.5;color:#655c51}
.share-status:empty{display:none}
.share-pop .share-status{display:block;margin-top:8px}
.share-panel{display:grid;gap:8px}
.share-copy-area{position:fixed;top:-1000px;left:-1000px;opacity:0}
@media (max-width:560px){
  .share-pop{position:fixed;top:auto;left:12px;right:12px;bottom:12px;max-width:none;width:auto;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto}
  .share-options{grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* 動画のすぐ下の「共有」（primary）の一覧：ボタンの上に出る（下端がボタンの上端 − 8px）。位置・幅・高さは /share-pop.mjs が開いている間に測って決める（ページは送らない）。
   position: fixed なので、下の中身を押し下げず、操作の行・枠の overflow にも切られない。入りきらないときは一覧の中だけ縦に動かす（ページには伝えない）。 */
.share-primary .share-pop{position:fixed;top:0;left:0;right:auto;bottom:auto;z-index:100;box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-width:none;max-height:none;overflow-y:auto;overscroll-behavior:contain}
/* スマホ幅で複数段が上の空きに入らないとき：行き先を 1 段の横並びにして、その段だけ横に動かす（縦のスクロールより先）。大きさ・色・並びはそのまま。 */
.share-primary .share-pop[data-strip] .share-options{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:76px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
.share-primary .share-pop[data-strip] .share-options::-webkit-scrollbar{display:none}
@media(pointer:coarse){
.share-primary .share-pop[data-strip] .share-option[data-share-channel=native]{grid-column:auto;flex-direction:column;justify-content:flex-start;gap:5px;min-height:64px;margin:0;padding:7px 0 6px;border-radius:12px;background:transparent;color:#2b2520;font-size:12px}
.share-primary .share-pop[data-strip] .share-option[data-share-channel=native]:hover{background:#f8e4dc}
.share-primary .share-pop[data-strip] .share-option[data-share-channel=native] .share-mark{width:36px;height:36px}
}
