/* Discover (discover.js): paintings on a dark gallery wall, each thing a button. Uses app.css's tokens. */
.dc-head { margin: 18px 0 8px; }
.dc-head h1 { font-family: var(--text); font-weight: 600; font-size: 34px; line-height: 1.15; margin: 0 0 6px; }
.dc-head p { margin: 0 0 14px; max-width: 62ch; color: var(--muted); }
.dc-cards { margin-top: 18px; }
.dc-cards .pcard > span { line-height: 1.45; }

.dc { --wall: #0e1322; }
.dc-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dc-modes { margin-left: auto; }
.dc-modes a { flex: 1; display: grid; place-items: center; height: 40px; padding: 0 16px; border-radius: 9px; font-size: 15px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.dc-modes a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.dc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.dc-col { min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .dc-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
  .dc-side { position: sticky; top: 76px; }
}

/* the wall and the frame */
.dc-wall { background: radial-gradient(120% 90% at 50% 0%, #1b2440 0%, var(--wall) 70%); border-radius: 14px; padding: 18px 12px; display: flex; justify-content: center; }
@media (max-width: 720px) { .dc-wall { margin: 0 -16px; border-radius: 0; padding: 10px 0; } }
.dc-frame { position: relative; width: min(100%, calc(78vh * var(--ar))); aspect-ratio: var(--ar); overflow: hidden; background: #000;
  box-shadow: 0 0 0 5px #2a2218, 0 0 0 6px #6b5a3a, 0 18px 40px rgba(0, 0, 0, .55); touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.dc-frame.zoomed { cursor: grab; }
.dc-pan { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; will-change: transform; --z: 1; }
.dc-pan.anim { transition: transform .35s ease; }
.dc-img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.dc-label { align-self: center; max-width: 520px; text-align: center; margin: 14px 0 4px; font-family: var(--text); }
.dc-label b { display: block; font-size: 19px; font-weight: 600; font-style: italic; }
.dc-label span { display: block; font-size: 15px; color: var(--muted); }
.dc-label small { display: block; margin-top: 4px; font: 12.5px/1.4 var(--ui); color: var(--muted); }
.dc-label a { color: var(--gold-ink); }
.dc-tools { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 0; }
.dc-prog { font-size: 14px; color: var(--muted); }

/* zoom controls */
.dc-zoom { position: absolute; right: 8px; bottom: 8px; z-index: 5000; display: flex; flex-direction: column; gap: 4px; }
.dc-zoom button { width: 36px; height: 36px; border-radius: 10px; background: rgba(14, 19, 34, .78); color: #f1e7cf; font: 600 18px/1 var(--ui); box-shadow: inset 0 0 0 1px rgba(205, 176, 127, .45); }
.dc-zoom button:hover { background: rgba(14, 19, 34, .95); }

/* the things */
.dc-t { position: absolute; display: block; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; border-radius: 3px; -webkit-tap-highlight-color: transparent; }
.dc-t.more { pointer-events: auto; }
@media (hover: hover) {
  .dc[data-mode="explore"] .dc-t:hover { background: rgba(240, 214, 150, .10); box-shadow: 0 0 0 calc(1.5px / var(--z)) rgba(240, 214, 150, .85), 0 0 12px rgba(240, 214, 150, .35); }
}
.dc-t:focus-visible { outline: 3px solid #fff; outline-offset: 1px; box-shadow: 0 0 0 5px #000; z-index: 4000 !important; }
.dc-t.sel { box-shadow: 0 0 0 calc(2px / var(--z)) #f0d696, 0 0 16px rgba(240, 214, 150, .5); background: rgba(240, 214, 150, .12); }
.dc-t.good { box-shadow: 0 0 0 calc(3px / var(--z)) #7fc593, 0 0 18px rgba(127, 197, 147, .6); background: rgba(127, 197, 147, .18); }
.dc-t.bad { box-shadow: 0 0 0 calc(3px / var(--z)) #e08a74; background: rgba(224, 138, 116, .16); }
.dc-t.reveal { animation: dc-pulse 1s ease-in-out infinite; box-shadow: 0 0 0 calc(3px / var(--z)) #f0d696; background: rgba(240, 214, 150, .2); }
@keyframes dc-pulse { 50% { background: rgba(240, 214, 150, .05); } }
@media (prefers-reduced-motion: reduce) { .dc-t.reveal { animation: none; } .dc-pan.anim { transition: none; } }

/* gold tags on the things found */
.dc-tag { display: none; position: absolute; left: 0; top: 0; transform: scale(calc(1 / var(--z))); transform-origin: 0 0; white-space: nowrap; pointer-events: none;
  background: #cdb07f; color: #141b31; font: italic 400 14px/1 var(--text); padding: 3px 7px 4px; border-radius: 3px 3px 3px 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.dc[data-mode="explore"] .dc-t.found .dc-tag, .dc[data-mode="explore"] .dc-frame.all .dc-tag, .dc-frame.tagall .dc-t.found .dc-tag { display: block; }
.dc-frame.all .dc-t { z-index: auto; }
.dc[data-mode="quid"] .dc-frame.tagall .dc-t.found .dc-tag { display: block; }

/* the lit thing in Quid est */
.dc-spot { position: absolute; pointer-events: none; z-index: 3000; border-radius: 4px; box-shadow: 0 0 0 9999px rgba(8, 11, 22, .62), 0 0 0 calc(2px / var(--z)) #f0d696; animation: dc-glow 1.6s ease-in-out infinite; }
@keyframes dc-glow { 50% { box-shadow: 0 0 0 9999px rgba(8, 11, 22, .62), 0 0 0 calc(2px / var(--z)) #f0d696, 0 0 22px 4px rgba(240, 214, 150, .55); } }
@media (prefers-reduced-motion: reduce) { .dc-spot { animation: none; } }
.dc-frame.spotting .dc-t { pointer-events: none; }

/* the side: the card, or the play panel */
.dc-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 20px 20px 18px; position: relative; }
.dc-idle { color: var(--muted); }
.dc-hint, .dc-hint2 { margin: 0 0 6px; font-size: 15px; line-height: 1.5; }
.dc-hint2 { font-size: 13.5px; }
.dc-grab { display: none; }
.dc-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.dc-x:hover { background: var(--bg-2); }
.dc-x svg { width: 20px; height: 20px; }
.dc-la { font-family: var(--text); font-size: 46px; line-height: 1.05; font-weight: 500; padding-right: 40px; overflow-wrap: anywhere; }
.dc-headw { font-family: var(--text); font-style: italic; font-size: 18px; color: var(--gold-ink); margin: 6px 0 2px; }
.dc-en { font-size: 17px; margin-bottom: 4px; }
.dc-grc { font-family: "Source Serif 4", var(--text); font-size: 20px; color: var(--muted); margin: 4px 0; }
.dc-quote { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.dc-quote blockquote { margin: 0; font-family: var(--text); font-size: 20px; line-height: 1.4; }
.dc-quote mark { background: var(--hl); color: inherit; border-radius: 3px; padding: 0 2px; }
.dc-quote figcaption { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.dc-tr { margin-top: 8px; font-size: 14.5px; }
.dc-tr summary { cursor: pointer; color: var(--gold-ink); font-size: 14px; padding: 4px 0; }
.dc-tr p { white-space: pre-line; margin: 6px 0 4px; line-height: 1.5; max-height: 190px; overflow-y: auto; }
.dc-tr small { color: var(--muted); }
.dc-read { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--gold-ink); font-size: 14.5px; text-decoration: none; }
.dc-read:hover { text-decoration: underline; }
.dc-read svg { width: 16px; height: 16px; }
.dc-acts { margin-top: 16px; display: flex; gap: 10px; }

.dc-play { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 20px; }
.dc-step { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dc-ask { font-family: var(--text); font-size: 30px; line-height: 1.2; margin: 6px 0 8px; }
.dc-ask span { color: var(--muted); }
.dc-ask b { font-weight: 600; font-size: 40px; overflow-wrap: anywhere; }
.dc-opts { display: grid; gap: 10px; margin: 14px 0; grid-template-columns: 1fr 1fr; }
.dc-opt { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 12px 14px; min-height: 52px;
  font-family: var(--text); font-size: 22px; text-align: left; overflow-wrap: anywhere; }
.dc-opt i { font: 600 12px/1 var(--ui); color: var(--muted); font-style: normal; width: 16px; }
.dc-opt:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--gold); }
.dc-opt.right { background: rgba(70, 140, 90, .16); box-shadow: inset 0 0 0 2px #4b8a5d; }
.dc-opt.wrong { background: rgba(180, 70, 50, .14); box-shadow: inset 0 0 0 2px #b4513a; }
.dc-play .done { padding-top: 6px; }
.dc-play .done .big { font-size: 34px; }

/* Cursus */
.dc-time { height: 4px; background: var(--bg-2); border-radius: 2px; margin: -4px 0 14px; }
.dc-time i { display: block; height: 100%; width: 100%; background: var(--gold); border-radius: 2px; }
.dc-score { margin-left: auto; font: 600 22px/1 var(--text); font-variant-numeric: tabular-nums; color: var(--gold-ink); }
.dc-intro { max-width: 520px; margin: 30px auto; text-align: center; }
.dc-intro h1 { font-family: var(--text); font-size: 40px; font-weight: 600; margin: 0 0 8px; }
.dc-intro p { color: var(--muted); margin: 0 0 14px; }
.dc-hidden { display: none !important; }

/* phone: the card rises from the bottom, above the tab bar */
@media (max-width: 899px) {
  .dc[data-mode="explore"] .dc-side { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; padding: 0; transform: translateY(110%); transition: transform .25s ease; pointer-events: none; }
  .dc[data-mode="explore"] .dc-side.open { transform: none; pointer-events: auto; }
  .dc[data-mode="explore"] .dc-side:not(.open) { visibility: hidden; }
  .dc[data-mode="explore"] .dc-card { border-radius: 18px 18px 0 0; max-height: 52vh; overflow-y: auto; padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); }
  .dc[data-mode="explore"] .dc-idle { position: static; }
  .dc-grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
  .dc-la { font-size: 32px; }
  .dc[data-mode="explore"] .dc-card { max-height: 42vh; }
  .dc[data-mode="explore"] .dc-quote blockquote { font-size: 17px; }
  /* the close button stays in reach while the card scrolls */
  .dc[data-mode="explore"] .dc-x { position: sticky; top: 0; float: right; margin: -6px -8px 0 8px; z-index: 2; background: var(--bg-2); color: var(--ink); width: 40px; height: 40px; }
  .dc[data-mode="ubi"] .dc-side, .dc[data-mode="cursus"] .dc-side { order: -1; position: sticky; top: 52px; z-index: 20; }
  .dc[data-mode="ubi"] .dc-play, .dc[data-mode="cursus"] .dc-play { padding: 10px 16px; border-radius: 12px; }
  .dc[data-mode="ubi"] .dc-ask b, .dc[data-mode="cursus"] .dc-ask b { font-size: 32px; }
  .dc[data-mode="ubi"] .dc-ask, .dc[data-mode="cursus"] .dc-ask { font-size: 24px; margin: 2px 0; }
  .dc-head h1 { font-size: 28px; }
  .dc-modes { margin-left: 0; flex: 1 1 100%; }
  .dc-modes a { padding: 0 6px; font-size: 14px; }
  .dc-opts { grid-template-columns: 1fr 1fr; }
  .dc-opt { font-size: 20px; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { .dc[data-mode="explore"] .dc-side { transition: none; } }
