/* duel (loaded after styles.css and hero.css) */
/* Example: the film's closing card. Way 1 paints a QR that does not scan; Way 2 uses the real one. */

/* Way 2: box around the real QR card in assets/ending.jpg (960x540, card at x 670-909, y 135-414) */
.bg3 .duel .hl-box { left: 69.79%; top: 25%; width: 25%; height: 51.85%; border-radius: 6px; }
.bg3 .duel .hl-box em { left: 50%; top: auto; bottom: 100%; translate: -50% -8px; }

/* Way 1: flag on the painted QR, one per try */
.gen-flag { position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: var(--r-pill); background: var(--ink); color: var(--on-dark); font: 500 var(--t-label) var(--mono); letter-spacing: .02em; white-space: nowrap; width: max-content; box-shadow: 0 6px 14px -6px oklch(0 0 0 / .6); }
.gen-flag::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.gf-1 { left: 77.5%; top: 16.7%; translate: -50% calc(-100% - 5px); }
.gf-2 { right: 63.5%; top: 58.3%; translate: 0 -50%; }
.duel.is-noted .gen-flag.s1 { display: inline-flex; animation: wr-pop .45s cubic-bezier(.2, 0, 0, 1) .35s backwards; }

/* Way 1 read-out swatches: Try 1 sunset card, Try 2 neon card */
.bgc-1 { background: linear-gradient(90deg, #2a1d4a, #8a3f6e 38%, #e0735a 70%, #f6c07e); }
.bgc-2 { background: radial-gradient(circle at 50% 70%, #1f6f78, #113446 55%, #07131f); }
.hed-1 { background: #5a2f5c; color: #fff5ea; font: 700 11.5px Georgia, "Times New Roman", serif; letter-spacing: .04em; }
.hed-2 { background: #0f2b3a; color: #e9fbff; font: italic 14px "Snell Roundhand", "Brush Script MT", cursive; }
.qr-1, .qr-2, .url-1, .url-2 { gap: 6px; font: 500 11px var(--mono); }
.qr-1, .url-1 { background: #fbf6ef; color: #3a3340; box-shadow: inset 0 0 0 1px var(--line); }
.qr-2, .url-2 { background: #08202c; color: #8ff6ff; }
.qr-1::before, .qr-2::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 2px; }
.qr-1::before { background: conic-gradient(#1d1a22 25%, transparent 0 50%, #1d1a22 0 75%, transparent 0) 0 0 / 4px 4px; }
.qr-2::before { background: radial-gradient(circle, #8ff6ff 0 1.1px, transparent 1.4px) 0 0 / 3px 3px; }
.url-1, .url-2 { text-decoration: underline wavy; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.url-1 { text-decoration-color: #c2573f; }
.url-2 { text-decoration-color: #ff9ad8; }

/* Way 2 timeline: only the QR card moves */
.wb-line { left: 0; right: 0; background: var(--line-2); }
.wb-qr { left: 40%; right: 0; background: var(--signal-soft); }
.wb-bg { left: 0; right: 0; background: var(--mute); }
.wb-music { left: 0; right: 8%; background: repeating-linear-gradient(90deg, var(--signal-soft) 0 3px, transparent 3px 5px); }
.duel.is-noted .wb-qr { left: 48%; background: var(--signal); }

/* wider label column for "Closing line" and "Background" */
.bg3 .duel .wr { grid-template-columns: 84px 1fr 54px; }
@media (max-width: 620px) {
  .bg3 .duel .wr { grid-template-columns: 76px 1fr 46px; }
  .url-1, .url-2 { font-size: 9.5px; letter-spacing: -.02em; }
}

/* the two "go deeper" tabs: they must look like buttons you can press */
.bgt-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
.bgt-tabs [role="tab"], .bgt-tabs [role="tab"] + [role="tab"] { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; border-radius: 16px; padding: 14px 14px 14px 20px; cursor: pointer; background: oklch(1 0 0 / .5); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .2s, box-shadow .2s, translate .2s cubic-bezier(.2, .7, .2, 1); }
.bgt-tabs [role="tab"] i { grid-row: 1 / span 2; align-self: center; }
.bgt-tabs [role="tab"] b, .bgt-tabs [role="tab"] small { grid-column: 2; }
.bgt-tabs [role="tab"]:hover { translate: 0 -1px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 22px -16px oklch(0.185 0.01 70 / .5); }
.bgt-tabs [role="tab"]:active { scale: .98; }
.bgt-tabs [aria-selected="true"], .bgt-tabs [aria-selected="true"]:hover { translate: none; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--signal), 0 12px 26px -18px oklch(0.185 0.01 70 / .55); }
.bgt-tabs [aria-selected="true"]::before { content: none; }
.bgt-go { grid-column: 3; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 8px; font: 500 var(--t-label)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.bgt-go em { font-style: normal; }
.bgt-go svg { width: 30px; height: 30px; padding: 8px; border-radius: 50%; background: var(--ink); fill: none; stroke: var(--card); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: rotate .25s, background-color .2s; }
.bgt-on { display: none; color: var(--signal-ink); }
[aria-selected="true"] .bgt-open { display: none; }
[aria-selected="true"] .bgt-on { display: inline; }
[aria-selected="true"] .bgt-go svg { rotate: 90deg; background: var(--signal); stroke: var(--ink); }
.bgtabs:not(.is-touched) [aria-selected="false"] .bgt-go svg { animation: bgt-nudge 2.2s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes bgt-nudge { 0%, 60%, 100% { translate: 0 0; box-shadow: 0 0 0 0 oklch(0.86 0.165 92 / 0); } 30% { translate: 4px 0; box-shadow: 0 0 0 6px oklch(0.86 0.165 92 / .35); } }
@media (prefers-reduced-motion: reduce) { .bgtabs:not(.is-touched) [aria-selected="false"] .bgt-go svg { animation: none; } }
@media (max-width: 620px) {
  .bgt-tabs { gap: 6px; padding: 6px; }
  .bgt-tabs [role="tab"], .bgt-tabs [role="tab"] + [role="tab"] { padding: 12px 10px 12px 14px; column-gap: 8px; }
  .bgt-go em { display: none !important; }
  .bgt-go svg { width: 26px; height: 26px; padding: 7px; }
}
@media (max-width: 620px) {
  .bgt-tabs [role="tab"], .bgt-tabs [role="tab"] + [role="tab"] { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
  .bgt-tabs [role="tab"] i { display: none; }
  .bgt-go { flex: none; }
}
