/* sheets.css: Dialog shell and the detail sheet, ticket stub, buttons, hover card, other-shows list. */
/* ---------- detail sheet ---------- */
dialog { border: 1px solid var(--line-strong); border-top: 3px solid var(--tc, var(--line)); padding: 0;
  width: min(94vw, 480px); max-height: 86vh; background: var(--surface); color: var(--ink);
  border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
dialog::backdrop { background: rgba(10, 10, 12, .45); }
/* Open/close: fade and settle on wide screens, slide up from the bottom on phones. */
/* Scrolling inside a sheet stays inside it: it doesn't carry on to the timeline behind, and the page behind
   can't be scrolled while a sheet is open. */
dialog, dialog .sheet, .venues, .plan-body { overscroll-behavior: contain; }
:root:has(dialog[open]) { overflow: hidden; }
/* clip, not hidden: hidden would make body a scroll box of its own, and the sticky header (and the ruler) would
   stick to it instead of the screen, jumping out of place while a sheet is open. */
:root:has(dialog[open]) body { overflow: clip; }
dialog { transition: opacity .18s var(--ease), translate .22s var(--ease), overlay .22s allow-discrete, display .22s allow-discrete; }
dialog:not([open]) { opacity: 0; translate: 0 10px; }
@starting-style { dialog[open] { opacity: 0; translate: 0 10px; } }
dialog::backdrop { transition: background-color .2s var(--ease), overlay .2s allow-discrete, display .2s allow-discrete; }
@starting-style { dialog[open]::backdrop { background-color: transparent; } }
@media (max-width: 600px) {
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-width: 3px 0 0; border-radius: 0; }
  dialog:not([open]) { opacity: 1; translate: 0 100%; }
  @starting-style { dialog[open] { opacity: 1; translate: 0 100%; } }
}
.sheet { position: relative; padding: 20px 22px calc(22px + env(safe-area-inset-bottom)); }
.sheet:focus { outline: none; }
.sheet .eyebrow { padding-right: 40px; font-family: var(--font-ja); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.sheet .eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); }
/* The theater name leads to its week page. */
.sheet .eyebrow a { display: inline-flex; align-items: center; gap: 2px; color: inherit; text-decoration: none; }
.sheet .eyebrow a svg { width: 12px; height: 12px; rotate: -90deg; opacity: .7; }
.sheet .eyebrow a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sheet h3 { margin: 0 0 8px; font-family: var(--font-title); font-weight: var(--title-weight); font-size: 24px; line-height: 1.35; letter-spacing: .01em; }
.sheet .program { display: flex; gap: 8px; align-items: baseline; font-family: var(--font-ja); font-size: 12px; margin-bottom: 12px; color: var(--muted); }
.sheet .program b { color: var(--tc); font-weight: 700; flex: none; }
.sheet .program a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }
/* The show's time as a ticket stub: time and date on the left, the add button past the perforation. */
.stub { position: relative; display: flex; align-items: stretch; margin: 14px 0 10px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--tc) 10%, var(--surface)); }
.stub.picked { background: var(--ticket); color: var(--ticket-ink); }
.stub-main { flex: 1; min-width: 0; padding: 12px 14px 11px 16px; }
.sheet .when { font-size: 24px; font-weight: 700; line-height: 1.15; margin: 0; white-space: nowrap; }
.sheet .when i { font-style: normal; margin: 0 .25em; opacity: .45; font-weight: 400; }
.stub-sub { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font-family: var(--font-ja); font-size: 12px; color: var(--muted); }
/* On the narrowest phones the date, running time and format move to a new line whole, never "（月）" or "分" alone. */
.stub-sub > span { white-space: nowrap; }
.stub.picked .stub-sub { color: inherit; opacity: .75; }
.stub-add { position: relative; flex: none; width: var(--cut); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 10px; border: 0; border-left: 2px dashed color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--ink); color: var(--bg); font-family: var(--font-ja); font-size: 13px; font-weight: 700; line-height: 1.3; text-align: center; cursor: pointer; }
.stub-add span { display: flex; flex-direction: column; }
.stub-add small { font-weight: 400; font-size: 11px; opacity: .7; }
.stub-add svg { width: 20px; height: 20px; }
.stub-add { border-left: 0; }
.stub-add:hover { background: color-mix(in srgb, var(--ink) 84%, var(--bg)); }
.stub.picked .stub-add { background: none; color: inherit; border-left: 2px dashed color-mix(in srgb, var(--ticket-ink) 35%, transparent); }
.stub.picked .stub-add:hover { background: color-mix(in srgb, var(--ticket-ink) 8%, transparent); }
/* Notches where the stub tears off, cut out of the stub so they match whatever is behind it. */
.stub { --cut: 128px;
  -webkit-mask: radial-gradient(circle 6px at calc(100% - var(--cut)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 6px at calc(100% - var(--cut)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 6px at calc(100% - var(--cut)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 6px at calc(100% - var(--cut)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat; }
.sheet .acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 18px; }
.sheet .acts .btn { justify-content: center; padding: 0 8px; font-size: 13px; white-space: nowrap; }
.sheet .facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-family: var(--font-ja); font-size: 13px; line-height: 1.55; }
.sheet .facts dt { color: var(--muted); }
.sheet .facts dd { margin: 0; }
.sheet .facts .read-more { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.sheet .facts .read-more a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-decoration: none; }
.sheet .facts .read-more a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sheet .facts .read-more svg { width: 13px; height: 13px; }
.sheet .facts small { color: var(--muted); font-size: 11px; margin-left: 4px; }
:root[data-design="a"] .sheet .when { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.sheet .fit { margin: 6px 0 10px; padding: 8px 12px; border-radius: var(--radius); white-space: pre-line;
  font-family: var(--font-ja); font-size: 13px; line-height: 1.6; }
.sheet .fit { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); }
.sheet .fit.ng { background: color-mix(in srgb, var(--ng) 9%, var(--surface)); }
.sheet .fit p { margin: 0; }
.sheet .fit .ok { color: var(--ok); }
.sheet .fit .ng { color: var(--ng); font-weight: 600; }
.sheet .meta { color: var(--muted); font-family: var(--font-ja); font-weight: var(--ja-light); font-size: 13px; margin: 0 0 4px; }
.sheet .links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 2px; font-family: var(--font-ja); font-size: 13px; }
.sheet .links a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-decoration: none; }
.sheet .links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sheet .links svg { width: 13px; height: 13px; }
.sheet .links .link-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-decoration: none; }
.sheet .links .link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.sheet .program a:hover { text-decoration-color: currentColor; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); border-radius: var(--radius); cursor: pointer;
  text-decoration: none; font-family: var(--font-ja); font-size: 13px; transition: background .12s ease, color .12s ease; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 82%, var(--bg)); }
/* Information, not a disabled control ("当日券のみ"): quiet, but fully readable. */
.btn.muted { color: var(--muted); cursor: default; border-color: var(--line); border-style: dashed; }
.btn.muted:hover { background: transparent; }
.btn.muted:active { transform: none; }
.sheet-bar { position: sticky; top: 0; z-index: 3; height: 0; margin: -20px -22px 20px; }
.x { position: absolute; top: 10px; right: 10px; height: 36px; min-width: 36px; padding: 0 9px; display: flex; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid transparent; border-radius: var(--radius); background: var(--surface); color: var(--muted); cursor: pointer;
  font-family: var(--font-ja); font-size: 13px; }
.x:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.x svg { width: 18px; height: 18px; }
.x span { display: none; }
@media (max-width: 600px) {
  /* Phones: a grab bar to swipe the sheet down, and a close button that says so. */
  .sheet { padding-top: 30px; }
  .sheet-bar { margin: -30px -22px 30px; }
  .sheet-bar::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; border-radius: 2px;
    background: var(--line-strong); opacity: .35; translate: -50% 0; }
  .x { top: 14px; right: 12px; height: 32px; padding: 0 12px 0 8px; border-radius: 16px; background: var(--surface-2); color: var(--ink); }
  .x span { display: inline; }
  .sheet .eyebrow, .contact h3, .help h3 { padding-right: 96px; }
  dialog { max-height: 88vh; }
  dialog.dragging { transition: none; }
}

/* hover card on shows (pointer devices) */
.tip { position: fixed; z-index: 30; width: max-content; max-width: 300px; padding: 10px 12px 10px; pointer-events: none;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-top: 3px solid var(--tc);
  border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .16); font-family: var(--font-ja); font-size: 12px; line-height: 1.5; }
.tip[hidden] { display: none; }
.tip b { display: block; font-family: var(--font-title); font-weight: var(--title-weight); font-size: 14px; line-height: 1.4; }
.tip .p { color: var(--muted); font-size: 11px; }
.tip .w { font-family: var(--font-num); font-stretch: var(--num-stretch); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; margin-top: 4px; }
.tip .m { color: var(--muted); }
.tip .tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 3px; }
.tip .tags span { padding: 0 6px; border-radius: 3px; font-size: 11px; font-weight: 700; line-height: 1.7; }
.tip .tags .last { background: color-mix(in srgb, currentColor 14%, transparent); }
.tip .tags .gauge { border: 1px solid currentColor; line-height: calc(1.7em - 2px); font-family: var(--font-num); font-weight: 600; opacity: .85; }
.tip .list, .sheet .meta.list { display: flex; flex-wrap: wrap; gap: 0 12px; }
.sheet .eyebrow span { margin-left: 6px; }
.tip .rel { white-space: pre-line; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.tip .rel.ok { color: var(--ok); } .tip .rel.ng { color: var(--ng); }
.tip .hint { margin-top: 4px; color: var(--muted); font-size: 11px; }
.also { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; font-family: var(--font-ja); font-size: 12px; }
.also b { display: block; margin-bottom: 6px; font-size: 12px; }
.also ul { margin: 0; padding: 0; list-style: none; color: var(--muted); display: grid; gap: 2px; }
.also .num { color: var(--ink); margin-right: 8px; }
.also button { display: flex; width: 100%; align-items: baseline; gap: 4px; padding: 5px 6px; margin: 0 -6px; border: 0; border-radius: var(--radius);
  background: none; color: var(--muted); text-align: left; cursor: pointer; font: inherit; }
.also button:hover { background: var(--surface-2); color: var(--ink); }
.also button .go { margin-left: auto; align-self: center; display: flex; color: var(--muted); }
.also button .go svg { width: 14px; height: 14px; rotate: -90deg; }
.also button:hover .go { color: var(--ink); }
/* The show you jumped to from "ほかの回" flashes once so it's easy to find. */
.show.spot, .label.spot, .vlabel.spot, .idle-chip.spot { animation: spot 1.4s var(--ease); }
@keyframes spot { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
/* The film's last showing at this theater (core.js finalIds). */
.sheet .stub-sub .final { padding: 0 7px; border-radius: 999px; background: var(--ink); color: var(--bg); font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.7; align-self: center; }
/* Checked in (timeline.js openDetail): the ticket is the 半券. Its stub, in the brand color with 半券ちゃん, shares it. */
.stub.checked .stub-share { gap: 2px; background: #2a6f77; color: #fff; border-left: 2px dashed color-mix(in srgb, #fff 45%, transparent); font-size: 12.5px; }
.stub.checked .stub-share:hover { background: #24616a; }
.stub.checked .stub-share small { opacity: .85; }
.stub-sub .no { font-weight: 700; letter-spacing: .04em; }
