/* Game screens: intro (scoring rules, load status), the result card with the photo, the summary */

/* --- intro --- */
#nogl { color: var(--danger); font-size: var(--text-md); font-weight: 600; }
/* today's daily game is played: the result and the time to the next game in two lines beside the icon */
#dailyDone { display: grid; grid-template-columns: auto 1fr; gap: 0 var(--space-3); --icon: var(--icon-check); }
#dailyDone::before { grid-row: span 2; background: var(--tier-good); }
#dailyDone p { margin: 0; }
.rules { display: flex; flex-direction: column; gap: var(--space-3); }
.rules summary {
  align-self: center; display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; list-style: none;
  font-size: var(--text-md); font-weight: 650; color: var(--muted);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.rules summary::-webkit-details-marker { display: none; }
.rules summary::before {
  content: ''; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--icon-help) center / contain no-repeat; mask: var(--icon-help) center / contain no-repeat;
}
.rules summary:hover, .rules[open] summary { color: var(--ink); }
.score-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0; text-align: center; }
.score-scale div { padding: var(--space-2) var(--space-1); border-radius: var(--radius-inner); }
.score-scale dt { font-size: var(--text-sm); color: var(--muted); line-height: 1.25; white-space: nowrap; }
.score-scale dd { margin: 2px 0 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-scale .good { background: var(--tier-good-bg); }
.score-scale .mid { background: var(--tier-mid-bg); }
.score-scale .bad { background: var(--tier-bad-bg); }
.rules p { font-size: var(--text-sm); color: var(--muted); text-align: center; }

/* --- result card: photo | place, distance, points, fact, credit, next button; without a photo one column --- */
.result-card { display: grid; grid-template-columns: 1fr; padding: 0; gap: 0; overflow: hidden; }
.result-card.has-photo { grid-template-columns: var(--dock-photo-w) 1fr; grid-template-rows: auto 1fr; }
.result-photo { margin: 0; grid-row: 1 / 3; min-height: 0; background: var(--surface-2); }
.result-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.result-head, .result-body { display: flex; flex-direction: column; gap: var(--space-3); padding: 0 var(--space-6); }
.result-head { padding-top: var(--space-5); }
.result-body { padding-top: var(--space-3); padding-bottom: var(--space-5); }
.result-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
#resultDistance { font-family: var(--font-display); font-size: var(--text-result); font-weight: var(--weight-display); line-height: 1; letter-spacing: var(--tracking-tight); }
#resultFact { color: var(--muted); }
.photo-credit { font-size: var(--text-xs); line-height: 1.4; color: var(--muted); }
.result-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-4); margin-top: var(--space-1); }
.result-actions .report-btn { margin-right: auto; font-size: var(--text-sm); color: var(--muted); }

/* --- summary --- */
.summary-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
#summary h1.total { font-size: var(--text-heading); line-height: 1.15; }
.total .num { font-size: 1.5em; color: var(--highlight); white-space: nowrap; }
.total .of { font-size: .6em; font-weight: 600; color: var(--muted); white-space: nowrap; }
.save-note[data-mode=""] { display: none; }
.save-note p { margin: 0; }
.save-note[data-mode="saving"], .save-note[data-mode="waiting"] { --icon: var(--icon-cloud); }
.save-note[data-mode="offline"] { --icon: var(--icon-alert); }
.save-note[data-mode="error"] { --icon: var(--icon-alert); }
.save-note[data-mode="error"]::before { background: var(--danger); }
.save-note[data-mode="saved"] { --icon: var(--icon-check); }
.save-note[data-mode="saved"]::before { background: var(--tier-good); }
.save-note[data-mode="guest"] { --icon: var(--icon-cloud); }

/* --- support dialog: QR Platba, the account to copy; on phones the account first (the QR cannot be scanned there) --- */
.qr-box { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; font-size: var(--text-sm); }
.qr-box img {   /* the code stays black on white in every theme, as bank apps expect */
  display: block; width: min(220px, 100%); height: auto; border-radius: var(--radius-inner); image-rendering: pixelated;
}
.pay-details { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; }
.pay-details div { padding: var(--space-3) 14px; border-radius: var(--radius-inner); background: var(--surface-2); }
.pay-details dt { font-size: var(--text-sm); color: var(--muted); }
.pay-details dd { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 var(--space-3); margin: 2px 0 0; font-weight: var(--weight-strong); }
.pay-details dd .btn-link { font-size: var(--text-sm); }
.is-mobile .qr-box img { width: 150px; }
.is-mobile .pay-details { order: -1; }
.is-mobile .pay-details dd .btn-link { padding: var(--space-2) var(--space-1); }   /* one tap to copy */
.is-mobile #support h2 { order: -3; }
.is-mobile #support h2 + p { order: -2; }

/* --- feedback dialog (js/ui/feedback.js): a message, or a question's problem; a guest gets the sign-in instead --- */
.feedback-question { font-weight: var(--weight-strong); }
.feedback-problems { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: 0; padding: 0; border: 0; }
.feedback-problems legend { width: 100%; margin-bottom: var(--space-2); padding: 0; font-size: var(--text-sm); font-weight: 650; color: var(--muted); }
.feedback-problems .check { align-items: center; color: var(--ink); }
.feedback-count { margin-top: calc(-1 * var(--space-2)); font-size: var(--text-sm); text-align: right; }
.feedback-hint { font-size: var(--text-sm); }
.feedback-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 640px), (orientation: landscape) and (max-height: 500px) {
  .result-card.has-photo { grid-template-columns: calc(96px + var(--space-4)) 1fr; grid-template-rows: auto auto; }
  .result-photo { grid-row: 1; margin: var(--space-4) 0 0 var(--space-4); width: 96px; height: 96px; border-radius: var(--radius-inner); overflow: hidden; }
  .result-head { padding: var(--space-4) var(--space-4) 0; gap: 6px; }
  .result-card.has-photo .result-head { padding-left: var(--space-3); }
  .result-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .result-body { grid-column: 1 / -1; padding: var(--space-3) var(--space-4) var(--space-4); }
  .result-actions #nextBtn { flex: 1; }
  .score-scale dt { font-size: var(--text-xs); }
}
