/* menus.css: Popover menus: 表示 (looks) and 劇場 (venues) with their lists, search, stars and drag handles. */
.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: 0 12px 32px rgba(0, 0, 0, .14); }
.looks, .venues { transition: opacity .16s var(--ease), translate .16s var(--ease), overlay .16s allow-discrete, display .16s 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; } }
/* Without the popover API: closed menus are hidden, an open one sits above the header. */
.no-popover [popover] { z-index: 40; }
.no-popover [popover]:not(.open) { display: none; }
.no-popover [popover].open { opacity: 1; translate: none; }
/* 劇場メニュー: which theaters to show and in what order */
.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; }
/* Area shortcuts: one sideways-scrolling line of small chips. */
.vareas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 8px; padding: 0 12px; }
.vareas::-webkit-scrollbar { display: none; }
/* Like the date strip: fade the edge that has more chips beyond it. */
.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: 14px; 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); }
/* Own chevron instead of the browser's, which sits off-centre on some systems. */
.vsort select { -webkit-appearance: none; appearance: none; padding-right: 28px !important;
  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; }
.vsort select { height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background-color: var(--bg); color: var(--ink); font: 13px var(--font-ja); }
.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 .12s var(--ease), color .12s 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; }
/* The heading (with 絞り込みを解除) stays at the top while the list scrolls. */
.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; }
/* Like a facet list: a quiet "この館だけ" link on the row shows only that theater; on the one
   theater left, it turns into "すべて表示". On touch it's always there; with a mouse, on hover. */
.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: none; color: var(--muted);
  font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.only:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
/* With a mouse it sits over the end of the row (so names keep their width) and shows on hover;
   on touch it's an icon in its own small column. */
@media (hover: hover) {
  .vrow { position: relative; }
  .vrow .only { position: absolute; right: 60px; top: 50%; translate: 0 -50%; background: var(--surface-2); opacity: 0; }
  /* 自分で決める order adds the ↑↓ buttons at the end of the row, which pushes the star left: clear both. */
  .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; } }
/* Hidden but still holding its height, so the heading doesn't jump when すべて表示 comes and goes. */
.vhead .text-btn[hidden] { display: inline-flex; visibility: hidden; }
/* お気に入り: a star on each row, and the すべて / お気に入り switch above the chips. */
.star { 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; }
.star[aria-pressed="true"] { color: #d4a017; }
/* Hover: the star warms to gold and lifts a little — a hint of what pressing does. */
.star svg { transition: scale .15s var(--ease), color .15s var(--ease); }
.star:hover { background: color-mix(in srgb, #f2c94c 14%, transparent); color: #d4a017; }
.star:hover svg { scale: 1.15; }
.star[aria-pressed="true"]:hover { color: #d4a017; }
/* Starring: the star bounces, a ring opens, and six sparks fly out and fade. */
.star { position: relative; }
.star.pop svg { animation: star-pop .45s var(--ease); }
.star.pop::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid #f2c94c; 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: #f2c94c; 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 #ffe28a, 17px 10px 0 -.5px currentColor,
    0 20px 0 -1px #ffe28a, -17px 10px 0 -.5px currentColor, -17px -10px 0 -1px #ffe28a; }
}
@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: #f2c94c; }
.star-view button:disabled { opacity: .5; cursor: default; }
.hidden-note svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; color: #d4a017; }
.vrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; background: var(--surface);
  transition: translate .15s var(--ease), box-shadow .15s var(--ease); align-items: center; gap: 4px; padding: 2px 0; border-radius: var(--radius); }
.vrow:hover { background: var(--surface-2); }
/* Drag to reorder: the grabbed row follows the pointer, the others slide to make room. */
.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 .15s var(--ease); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); background: var(--surface); }
.vrow.dragging .handle { cursor: grabbing; }
body.reordering { cursor: grabbing; user-select: none; }
/* The way to /theaters/ (each theater's page), next to the heading so it takes no room from the list. */
.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); }
/* Only the name truncates; the ward and distance after it always stay visible. */
/* Long names (アンスティチュ・フランセ東京 エスパス・イマージュ) wrap to a second line rather than being cut off. */
.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; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px; }
.looks .opt { margin: 6px 6px 10px; font-family: var(--font-ja); }

