/* The guide of the photo-selection screen (guide.js): one dialog over the whole screen -- in the overview the screen
   tinted with its parts outlined and numbered, in the tour each step a large coloured disc from the lit part, the part
   showing through a hole in it with a ring on its edge, the words on the disc in white -- and the words at the screen's
   foot (beside the lit part when the phone is held sideways). */
.review-title-row { display: flex; align-items: center; gap: 10px; }
.review-title-row h2 { margin: 0; }
.guide-open-btn { flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; cursor: pointer;
  color: var(--ink-dim); background: transparent; border: 1px solid var(--line-strong); border-radius: 50%;
  font-family: "Fraunces", Georgia, serif; font-size: 1.1rem; font-weight: 600; line-height: 1;
  transition: background .15s ease, color .15s ease; }
.guide-open-btn:hover { background: var(--surface-hover); color: var(--ink); }

dialog.guide { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; overflow: hidden; color: var(--ink); }
dialog.guide::backdrop { background: transparent; }
dialog.guide:not(.overview) { background: rgba(4, 4, 8, .35); }
dialog.guide.overview { background: rgba(48, 38, 120, .72); }
/* On the light page the discs keep their colours; only what is around them dims less (near black over paper read as
   the screen going off). */
:root[data-theme="light"] dialog.guide:not(.overview) { background: rgba(28, 24, 40, .16); }
:root[data-theme="light"] dialog.guide.overview { background: rgba(91, 75, 214, .38); }
/* The floating Create lies over whatever is under it at the screen's top: lit with the toolbar, it read as the dice step's
   part. It shows only on the step about it. */
body:has(dialog.guide[open]:not([data-part^="header"])) .top-next-btn { visibility: hidden; }
.guide-spot { position: fixed; border-radius: 50%; pointer-events: none; border: 4px solid rgba(255, 255, 255, .75);
  animation: guide-ring 1.6s ease-in-out infinite; }
.guide-spot[hidden] { display: none; }
.guide-mark { position: fixed; display: block; padding: 0; border: 2px dashed #fff; border-radius: 14px;
  background: rgba(255, 255, 255, .1); cursor: pointer; }
.guide-mark[hidden] { display: none; }
.guide-num { position: absolute; top: 6px; left: 6px; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 16px;
  display: grid; place-items: center; background: #fff; color: #14100a; font-weight: 800; font-size: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }

.guide-card { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); margin: 0 auto;
  max-width: 460px; max-height: 72vh; overflow-y: auto; box-sizing: border-box; padding: 18px 20px 16px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
dialog.guide.overview .guide-card { max-height: 58vh; }   /* room above it for the outlined parts; its list scrolls */
/* In the tour the words lie on the disc, white. */
dialog.guide:not(.overview) .guide-card { background: transparent; border: 0; box-shadow: none; color: #fff; }
dialog.guide:not(.overview) .guide-card h3 { color: #fff; font-weight: 600; }
dialog.guide:not(.overview) .guide-card p { color: rgba(255, 255, 255, .86); }
dialog.guide:not(.overview) .guide-count { color: rgba(255, 255, 255, .8); }
dialog.guide:not(.overview) .guide-close, dialog.guide:not(.overview) .guide-skip { color: rgba(255, 255, 255, .85); }
dialog.guide:not(.overview) .guide-back { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
dialog.guide:not(.overview) .guide-next { background: #fff; color: #1c1a22; border: 0; }
dialog.guide.side .guide-card { left: auto; top: 12px; bottom: 12px; right: 12px; width: min(46vw, 380px); max-height: none; }
.guide-card h3 { margin: 2px 44px 6px 0; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 1.25rem; line-height: 1.25; }
.guide-card p { margin: 0; color: var(--ink-dim); font-size: .95rem; line-height: 1.5; }
.guide-card .guide-example { height: 150px; margin: 0 40px 12px 0; border-radius: 12px; }   /* clear of the close button */
@media (max-height: 700px) { .guide-card .guide-example { height: 96px; } }   /* a small phone keeps room above the card for the part */
.guide-count { display: block; color: var(--accent); font-weight: 800; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.guide-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: transparent;
  color: var(--ink-dim); font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.guide-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.guide-list li { min-width: 0; }
.guide-pick { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; text-align: left;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; font: inherit;
  font-weight: 600; font-size: .86rem; line-height: 1.25; cursor: pointer; overflow-wrap: anywhere; }
.guide-pick::before { content: attr(data-number); flex: none; min-width: 24px; height: 24px; border-radius: 12px; display: grid;
  place-items: center; background: var(--gold); color: #14100a; font-weight: 800; font-size: .8rem; }
.guide-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 14px; }
.guide-buttons button { min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); font: inherit; font-weight: 700; cursor: pointer; }
.guide-skip { margin-right: auto; background: transparent; border: 0; color: var(--muted); }
.guide-back { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); }
/* While the guide shows the real thing (a look-alike pair, the video editor), it steps out of sight; that dialog carries
   the guide's note at its top. */
dialog.guide.demo { background: transparent; }
dialog.guide.demo > * { visibility: hidden; }
.guide-note { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: rgba(240, 177, 85, .12);
  border: 1.5px solid var(--gold); color: var(--ink); }
.guide-note h3 { margin: 0 0 4px; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 1.1rem; }
.guide-note p { margin: 0; color: var(--ink-dim); font-size: .92rem; line-height: 1.45; }
.guide-note .guide-buttons { margin-top: 10px; }
.guide-note .guide-buttons button { min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); font: inherit; font-weight: 700; cursor: pointer; }

/* The disc (guide.js placeDisc): its hole an ellipse through the lit part's corners; the steps take one colour and the
   other in turn. */
.guide-disc { position: fixed; border-radius: 50%; pointer-events: none; --disc: #5b4bd6;
  background: radial-gradient(var(--hole-w) var(--hole-h) at var(--hole-x) var(--hole-y), transparent 99%, var(--disc) 100%);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .45); animation: guide-disc-in .35s ease-out; }
.guide-disc[hidden] { display: none; }
dialog.guide[data-tone="1"] .guide-disc { --disc: #9a5a12; }   /* a deep amber: white reads on it */
@keyframes guide-disc-in { from { transform: scale(.25); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes guide-ring { 50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, .22); } }
@media (prefers-reduced-motion: reduce) { .guide-disc, .guide-spot { animation: none; } }

/* While a first film is under way (wait-tour.js): the photo screen's steps as a slideshow, opened by itself, each with
   a small live picture (it borrows the format trail's pictures: wizard-trail.css). */
dialog.wait-tour { width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; box-sizing: border-box;
  padding: 0 0 16px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface); color: var(--ink); }
dialog.wait-tour::backdrop { background: rgba(4, 4, 8, .72); }
dialog.wait-tour > :not(.wait-picture) { margin-left: 18px; margin-right: 18px; }
dialog.wait-tour .guide-count { margin-top: 14px; }
dialog.wait-tour h3 { margin-top: 4px; margin-bottom: 6px; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 1.25rem; }
dialog.wait-tour p { margin-top: 0; color: var(--ink-dim); font-size: .95rem; line-height: 1.5; }
dialog.wait-tour .guide-buttons button { min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); font: inherit; font-weight: 700; cursor: pointer; }
.wait-picture { height: 200px; }
.wait-look img { animation: trail-zoom 3s ease-in-out infinite alternate; }
.wait-look img + img { animation: wait-fade 6s ease-in-out infinite; }
@keyframes wait-fade { 0%, 40% { opacity: 0; } 50%, 90% { opacity: 1; } 100% { opacity: 0; } }
.wait-pace-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.wait-pace-bar::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform-origin: left; animation: wait-bar 2.4s linear infinite; }
@keyframes wait-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.wait-slider input { position: absolute; left: 12px; right: 12px; bottom: 8px; width: calc(100% - 24px); accent-color: var(--gold); pointer-events: none; }
.wait-similar { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; }
.wait-similar img { position: static; border-radius: 8px; }
.wait-scissors { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 10, 14, .78); color: #fff; font-size: 1.3rem; animation: wait-pulse 1.6s ease-in-out infinite; }
@keyframes wait-pulse { 50% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(240, 177, 85, .35); } }
@media (prefers-reduced-motion: reduce) { .wait-picture * { animation: none !important; } }
