/* menus.css: ポップオーバーのメニュー: 表示（見た目）と劇場。リスト・検索・星・ドラッグの持ち手を含む。 */
.looks, .venues { position: fixed; inset: auto; top: 54px; right: 16px; margin: 0;
  width: min(320px, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-3);
  transition: opacity var(--dur-quick) var(--ease), translate var(--dur-quick) var(--ease), overlay var(--dur-quick) allow-discrete,
  display var(--dur-quick) allow-discrete; }
.looks:not(:popover-open), .venues:not(:popover-open) { opacity: 0; translate: 0 -6px; }
@starting-style { .looks:popover-open, .venues:popover-open { opacity: 0; translate: 0 -6px; } }
/* popover API がないとき: 閉じたメニューは隠し、開いたものはヘッダーの上に出す。 */
.no-popover [popover] { z-index: 40; }
.no-popover [popover]:not(.open) { display: none; }
.no-popover [popover].open { opacity: 1; translate: none; }
/* 劇場メニュー: どの劇場を、どの順で出すか */
.venues { width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 80px); overflow-y: auto; padding: 12px;
  font-family: var(--font-ja); }
.venues h3 { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.vlist.auto-order .handle, .vlist.auto-order .move { display: none; }
.vlist.auto-order .vrow { grid-template-columns: minmax(0, 1fr) auto auto; }
.vsearch { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
/* 地域のショートカット: 小さなチップを横スクロールの1行に並べる。 */
.vareas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 8px; padding: 0 12px; }
.vareas::-webkit-scrollbar { display: none; }
/* 日付の帯と同じ: 先にまだチップがある側の端を薄くする。 */
.vareas.more-r { -webkit-mask: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
  mask: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.vareas.more-l:not(.more-r) { -webkit-mask: linear-gradient(90deg, transparent, #000 36px);
  mask: linear-gradient(90deg, transparent, #000 36px); }
.vareas.more-l.more-r { -webkit-mask: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 48px),
  transparent); mask: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 48px), transparent); }
.vareas button { flex: none; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--ink); font: 12px var(--font-ja); cursor: pointer; white-space: nowrap; }
.vareas button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
@media (hover: hover) { .vareas button:hover { background: var(--surface-2); } }
.vsort { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 12px var(--font-ja); color: var(--muted);
  }
/* ブラウザ標準の山形は環境によって中心からずれるため、自前で描く。 */
.vsort select { -webkit-appearance: none; appearance: none; height: 30px; padding: 0 8px;
  padding-right: 28px !important; border: 1px solid var(--line); border-radius: var(--radius);
  background-color: var(--bg); color: var(--ink); font: 13px var(--font-ja);
  background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8e96' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.vq { position: relative; flex: 1; min-width: 0; display: flex; }
.vq input::-webkit-search-cancel-button { display: none; }
.vq-clear { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 26px; height: 26px; display: grid;
  place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted);
  cursor: pointer; }
.vq-clear svg { width: 14px; height: 14px; }
.vq-clear[hidden] { display: none; }
.vsearch input { padding-right: 34px !important; flex: 1; min-width: 0; height: 34px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); color: var(--ink);
  font: 16px var(--font-ja); }
.vsearch .text-btn { flex: none; white-space: nowrap; color: var(--accent); }
.opt { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 12px; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; font-size: 12px; color: var(--muted); cursor: pointer;
  transition: background-color var(--dur-quick) var(--ease), color var(--dur-quick) var(--ease); }
.seg button:hover { border-color: var(--line-strong); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.vlist { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid;
  gap: 2px; }
/* 見出し（絞り込みを解除つき）は、リストがスクロールしても上に残る。 */
.vhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -12px -12px 10px;
  padding: 12px 12px 8px; position: sticky; top: -12px; z-index: 3; background: var(--surface); }
.vhead h3 { margin: 0; }
/* ファセット一覧のように、行の控えめな「この館だけ」でその劇場だけを表示し、1館だけのときは「すべて表示」
   に変わる。タッチでは常に出し、マウスではホバーで出す。 */
.only svg { width: 13px; height: 13px; }
.vhead .text-btn svg { width: 13px; height: 13px; }
.only, .vhead .text-btn { display: inline-flex; align-items: center; gap: 4px; }
.only { padding: 4px 6px; border: 0; border-radius: var(--radius); background-color: transparent; color: var(--muted);
  font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.only:hover { color: var(--accent); }
/* マウスでは行の端に重ねて（名前の幅を取らない）ホバーで出し、タッチでは専用の小さな列にアイコンとして置く。 */
@media (hover: hover) {
  .vrow { position: relative; }
  .vrow .only { position: absolute; right: 60px; top: 50%; translate: 0 -50%; background: var(--surface-2); opacity: 0;
    }
  /* 「自分で決める」順では行の端に ↑↓ ボタンが加わり星が左へ押されるため、両方を避ける。 */
  .vlist:not(.auto-order) .vrow .only { right: 98px; }
  .vrow:hover .only, .only:focus-visible { opacity: 1; }
}
@media (hover: none) { .only span { display: none; } .only svg { width: 16px; height: 16px; } }
/* 非表示でも高さは保ち、すべて表示の出入りで見出しが跳ねないようにする。 */
.vhead .text-btn[hidden] { display: inline-flex; visibility: hidden; }
.star { position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0;
  border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
.star svg { width: 18px; height: 18px; transition: scale var(--dur-quick) var(--ease), color var(--dur-quick) var(--ease); }
.star[aria-pressed="true"] { color: var(--star); }
.star:hover { background: color-mix(in srgb, var(--star-soft) 14%, transparent); color: var(--star); }
.star:hover svg { scale: 1.15; }
.star[aria-pressed="true"]:hover { color: var(--star); }
/* 星を付ける: 星が弾み、輪が開き、6つの火花が飛んで消える。 */
.star.pop svg { animation: star-pop .45s var(--ease); }
.star.pop::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--star-soft);
  animation: star-ring .5s ease-out forwards; pointer-events: none; }
.star.pop::before { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px;
  border-radius: 50%; color: var(--star-soft); animation: star-sparks .6s ease-out forwards; pointer-events: none; }
@keyframes star-pop { 0% { scale: .4; } 45% { scale: 1.35; } 70% { scale: .92; } 100% { scale: 1; } }
@keyframes star-ring { from { opacity: .9; scale: .4; } to { opacity: 0; scale: 1.5; } }
@keyframes star-sparks {
  0% { opacity: 1;
    box-shadow: 0 0 0 0 currentColor, 0 0 0 0 currentColor, 0 0 0 0 currentColor, 0 0 0 0 currentColor,
    0 0 0 0 currentColor, 0 0 0 0 currentColor; }
  70% { opacity: 1; }
  100% { opacity: 0;
    box-shadow: 0 -20px 0 -.5px currentColor, 17px -10px 0 -1px var(--star-glow), 17px 10px 0 -.5px currentColor,
    0 20px 0 -1px var(--star-glow), -17px 10px 0 -.5px currentColor, -17px -10px 0 -1px var(--star-glow); }
}
@media (prefers-reduced-motion: reduce) { .star.pop svg, .star.pop::after, .star.pop::before,
  .star svg { animation: none; transition: none; } .star.pop::after, .star.pop::before { display: none; } }
.star-view { margin: 0 0 8px; }
.star-view button { display: inline-flex; align-items: center; gap: 4px; }
.star-view button svg { width: 13px; height: 13px; }
.star-view button[aria-pressed="true"] svg { color: var(--star-soft); }
.star-view button:disabled { opacity: .5; cursor: default; }
.hidden-note svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; color: var(--star); }
.vrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; background: var(--surface);
  transition: translate var(--dur-quick) var(--ease), box-shadow var(--dur-quick) var(--ease); align-items: center; gap: 4px; padding: 2px 0;
  border-radius: var(--radius); }
.vrow:hover { background: var(--surface-2); }
/* ドラッグで並べ替え: つかんだ行はポインターに付いてきて、ほかの行は場所を空けるよう滑る。 */
.handle { display: grid; place-items: center; width: 22px; height: 30px; color: var(--muted); cursor: grab;
  touch-action: none; border-radius: var(--radius); }
.handle:hover { color: var(--ink); background: var(--surface-2); }
.handle svg { width: 14px; height: 14px; }
.vrow.dragging { z-index: 2; transition: box-shadow var(--dur-quick) var(--ease); box-shadow: var(--shadow-2);
  background: var(--surface); }
.vrow.dragging .handle { cursor: grabbing; }
body.reordering { cursor: grabbing; user-select: none; }
/* /theaters/（各劇場のページ）への入口。見出しの横に置き、リストの幅を取らない。 */
.vlink { display: inline-flex; align-items: center; gap: 2px; margin-right: auto; margin-left: 10px; font-size: 12px;
  color: var(--muted); }
.vlink svg { width: 12px; height: 12px; }
.vlink:hover { color: var(--ink); }
.vnote { margin: 8px 0 0; font-size: 12px; color: var(--ng); }
.vnote[hidden] { display: none; }
.vrow.off .vname { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.vrow label { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; padding: 4px 0; }
.vrow input { width: 16px; height: 16px; margin: 0 0 0 6px; accent-color: var(--ink); cursor: pointer; }
/* 省略するのは名前だけ。あとに続く区と距離は常に見せる。 */
/* 長い名前（アンスティチュ・フランセ東京 エスパス・イマージュ）は切らずに2行に折り返す。 */
.vname { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-width: 0; font-size: 13px;
  font-weight: 500; line-height: 1.35; }
.vname .n { min-width: 0; }
.vname small { flex: none; font-size: 11px; font-weight: 400; color: var(--muted); }
.vrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); flex: none; }
.move { display: flex; }
.move .icon-btn { width: 26px; height: 26px; }
.move .icon-btn:disabled { opacity: .25; cursor: default; background: none; border-color: transparent; }
.hidden-note { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
.looks .opt { margin: 6px 6px 10px; font-family: var(--font-ja); }
.vrow label input, .vrow label .dot { flex: none; }
.vareas .vsep { flex: none; width: 1px; align-self: stretch; margin: 4px 2px; background: var(--line); }
.vsplit { list-style: none; padding: 12px 8px 4px; border-top: 1px dashed var(--line); color: var(--muted);
  font-size: 12px; }
