/* End-of-dig summary card (game.js showSummary), the Lantern UI (Colin's pick A): a parchment card in a wood frame,
   like the result card. Top to bottom: the rank, one line of points · depth · zone, the ore the dig won as slots, the
   chart of everyone's scores (#f-curve) with what the rank is out of, each answer folded under "See your answers",
   a row of small ways on (Share, Dig again, Sell your ore: whichever apply) and one button back to the surface. */
#s-summary { --sm-ink: var(--parch-ink, #321007); --sm-dim: var(--parch-ink-dim, #7a4a2a); --sm-edge: var(--parch-edge, #522919);
  width: min(calc(540px * var(--ui, 1)), calc(100vw - 24px)); gap: 14px; padding: 18px 20px 16px; text-align: center; color: var(--sm-ink);
  border: 10px solid transparent; border-radius: 0; clip-path: var(--notch); backdrop-filter: none;
  background: var(--parch-tex) 0 0 / 128px padding-box, linear-gradient(var(--parch, #f1d6a7), var(--parch, #f1d6a7)) padding-box,
    var(--wood-tex) 0 0 / 128px border-box, linear-gradient(var(--win), var(--win)) border-box;
  outline: var(--u) solid var(--win-edge); outline-offset: calc(var(--u) * -1);
  box-shadow: inset 0 0 0 var(--u) var(--win-edge), inset 0 0 0 calc(var(--u) * 2) var(--gold), inset 0 0 0 calc(var(--u) * 3) var(--sm-edge); }
#s-summary, #s-summary * { text-shadow: none; }

/* the rank: one big gold line, then the dig in one line */
.sum-hero { display: grid; gap: 6px; justify-items: center; }
#s-summary .final-depth { margin: 0; color: var(--gold); text-shadow: var(--ol); }
.sum-line { margin: 0; font: 700 1.15rem/1.3 var(--f-label); color: var(--sm-dim); }
.sum-line b { font-family: var(--f-num, var(--f-label)); color: var(--sm-ink); font-variant-numeric: tabular-nums; }
.sum-sub { margin: 0; font: 700 0.98rem/1.3 var(--f-label); color: var(--sm-dim); }
.sum-rank { margin-top: -8px; font-size: 0.9rem; }
.sum-rank:empty { display: none; }

/* a daily dig's XP and the next dig (progress.js): quiet lines under the dig's */
.sum-progress, .sum-next { margin: 0; text-align: center; font: 700 0.98rem/1.35 var(--f-label); }
.sum-progress { color: var(--amber, #a25522); }
.sum-next { color: var(--sm-dim); }

.curve { display: block; width: 100%; height: auto; overflow: visible; }

/* what the dig won: dark slots with the ore and a count; the name is each slot's tooltip */
.haul-ores { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.haul-ores:empty { display: none; }
.haul-slot { position: relative; display: grid; place-items: center; width: 52px; height: 52px; clip-path: var(--notch); background: var(--well, #5f321d);
  box-shadow: inset 0 0 0 var(--u) var(--win-edge); }
.haul-slot img { width: 36px; height: 36px; }
.haul-slot b { position: absolute; right: 4px; bottom: 2px; font: 700 0.9rem/1 var(--f-num, var(--f-label)); color: #fff1d6; text-shadow: var(--ol1); }
.haul-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 5px; margin: 8px 0 0;
  font: 700 0.95rem/1.4 var(--f-label); color: var(--sm-dim); }
.haul-total b { color: var(--sm-ink); }
.haul-total .coin-ico { margin-left: 2px; }

/* the answers, folded away until asked for: a quiet line, like the result card's "What others said" */
.sum-answers { justify-self: stretch; text-align: left; }
.sum-answers summary { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; cursor: pointer; list-style: none;
  font: 700 1rem/1.2 var(--f-label); color: var(--sm-dim); }
.sum-answers summary::-webkit-details-marker { display: none; }
.sum-answers summary::after { content: "›"; font-size: 1.2rem; line-height: 1; transition: rotate .15s; }   /* every fold's mark (hub.css .ac-more) */
.sum-answers[open] summary::after { rotate: 90deg; }
html[data-motion="reduce"] { .sum-answers summary::after { transition: none; } }
.sum-answers summary:hover, .sum-answers summary:focus-visible { outline: none; color: var(--amber, #a25522); text-decoration: underline 2px; text-underline-offset: 4px; }
.sum-answers[open] summary { margin-bottom: 8px; }

/* the small ways on (Share, Dig again, Sell your ore), then the one big way back up */
.sum-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sum-acts:not(:has(> :not([hidden]))) { display: none; }
/* a finger's tap height (44 px) on a phone or a touch screen; the desktop keeps the small buttons as they are */
@media (max-width: 520px), (pointer: coarse) { .sum-acts .btn.small { min-height: 44px; } }
#s-summary #btn-home { width: 100%; }

/* one row per prompt: ore, prompt, answer and points */
.ore-strip { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ore-strip li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: 10px;
  padding: 4px 12px 4px 8px; clip-path: var(--notch); background: var(--parch-lit, #f6daaf); box-shadow: inset 0 0 0 var(--u) var(--sm-edge); }
.ore-strip img { width: 28px; height: 28px; }
.ore-strip li.none img { opacity: 0.25; }
.os-text { display: grid; gap: 1px; min-width: 0; }
.os-q, .os-a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.os-q { font: 700 0.875rem/1.2 var(--f-label); color: var(--sm-dim); }
.os-a { font: 700 0.95rem/1.2 var(--f-label); color: var(--sm-ink); }
.ore-strip li.none .os-a { color: var(--sm-dim); font-weight: 600; }
.ore-strip small { font: 700 1rem/1 var(--f-num, var(--f-label)); color: var(--amber-lo, #5b2510); }
.ore-strip li.none small { color: var(--sm-dim); }

@media (max-width: 520px) {
  #s-summary { gap: 12px; padding: 14px 14px 12px; border-width: 8px; }
  .sum-line { font-size: 1.05rem; }
}

/* ---------- the share card's preview (share.js): the card, arrows to flip its background, and the ways to share ---------- */
.share-dlg { padding: 0; border: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; margin: auto; overflow: visible; }
.share-dlg::backdrop { background: rgba(2, 4, 14, 0.7); }
.sc-wrap { display: grid; gap: 10px; justify-items: center; width: min(440px, calc(100vw - 24px)); padding: 14px 16px 16px; box-sizing: border-box;
  clip-path: var(--notch); background: var(--wood-tex) 0 0 / 128px, var(--win);   /* the camp window's wood (the Lantern UI) */
  box-shadow: inset 0 0 0 var(--u) var(--win-edge), inset 0 0 0 calc(var(--u) * 2) var(--win-hi), inset 0 0 0 calc(var(--u) * 3) var(--win-edge); }
.sc-head { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.sc-head h2 { margin: 0; font: 700 1.25rem/1 var(--f-label); color: var(--win-ink); text-shadow: var(--ol); }
/* × like every window's (hub.css .menu-close): amber */
.sc-x { width: 40px; height: 40px; border: 0; background: var(--amber); box-shadow: inset 0 calc(var(--u) * -2) 0 var(--amber-lo), inset 0 0 0 var(--u) var(--win-edge);
  color: var(--win-ink); font: 700 1.4rem/1 var(--f-label); text-shadow: var(--ol1); cursor: pointer; clip-path: var(--notch); }
.sc-stage { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; }
.sc-card { display: block; height: min(60dvh, 560px); aspect-ratio: 9 / 16; width: auto; max-width: 100%; touch-action: pan-y; cursor: grab;
  box-shadow: 0 0 0 var(--u) #000, 0 6px 0 rgba(0, 0, 0, 0.5); }
.sc-card.sc-in-l { animation: sc-in-l .28s ease-out; }
.sc-card.sc-in-r { animation: sc-in-r .28s ease-out; }
@keyframes sc-in-l { from { transform: translateX(-12%); opacity: 0.5; } }
@keyframes sc-in-r { from { transform: translateX(12%); opacity: 0.5; } }
html[data-motion="reduce"] .sc-card { animation: none; }
.sc-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 44px; height: 64px; border: 0; cursor: pointer;
  background: rgba(40, 14, 5, 0.72); color: var(--win-ink); font: 700 2rem/1 var(--f-label); clip-path: var(--notch); }
.sc-arrow.l { left: 0; }
.sc-arrow.r { right: 0; }
.sc-arrow:hover, .sc-arrow:focus-visible { background: var(--amber); outline: none; }
.sc-x:hover, .sc-x:focus-visible { color: var(--gold); outline: none; }
.sc-name { margin: 0; font: 700 0.95rem/1.2 var(--f-label); color: var(--ink-dim); text-shadow: var(--ol1); }
.sc-dots { display: flex; gap: 8px; }
.sc-dots i { width: 10px; height: 10px; background: rgba(244, 217, 149, 0.25); }
.sc-dots i.on { background: var(--gold); }
.sc-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.sc-acts .sc-go { flex: 1 1 100%; }
.sc-msg { min-height: 1.2em; margin: 0; font: 700 0.9rem/1.2 var(--f-label); color: var(--win-ink); text-shadow: var(--ol1); text-align: center; }
