/* quiztime.net's own blocks inside the Lovetere frame (family/FRAME.md, "custom block"):
   the /web/ app (leaderboards, statistics, credits), the QR / store hand-off on /get/ and /events/join/,
   and /get/'s own store buttons (its script counts their clicks). The app rules came from assets/css/site.css
   and the pages' old <style> blocks; the app keeps its own tokens (assets/css/tokens.css, linked by /web/). */

/* The app's icons (Material Symbols Outlined, the weight-400 outline the app asked Google for), now from this origin */
@font-face {
  font-family: "Material Symbols Outlined"; font-style: normal; font-weight: 400; font-display: block;
  src: url("/assets/fonts/material-symbols-outlined.woff2") format("woff2");
}

/* /web/ loads Bootstrap 3, which sets the root to 10px; the frame's sizes are in rem */
html { font-size: 100%; }

/* ---------- /web/: the app ---------- */
.qt-app { font-size: 16px; line-height: 1.42857143; }
.qt-app h1, .qt-app h2, .qt-app h3 { font-weight: 600; letter-spacing: normal; line-height: 1.1; margin-top: 20px; margin-bottom: 10px; }
.qt-app h2 { font-size: 30px; }
.qt-app h3 { font-size: 24px; }
.qt-app p { margin: 0 0 10px; }
/* the rules above beat the app's own on its headings (.fr h2 is stronger than a class); put those back */
.qt-app .dashboard-title { font-weight: bold; margin: 24px 0 20px 0; }

/* the seven app views (leaderboards, statistics): a row of pills, the current one filled.
   The moved rules keep their old weight (:where adds none), so the app's own stylesheets still win as before. */
.qt-app .qt-appnav { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
:where(.qt-app) .btn-default {
	font-family: var(--qt-font-body);
	font-size: 15px;
	font-weight: 700;
	line-height: 20px;
	color: var(--qt-ink);
	background: var(--qt-surface2);
	border: none;
	border-radius: var(--qt-radius-pill);
	box-shadow: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
	padding: 8px 18px;
	min-height: 36px;
	transform: translateY(0);
}
:where(.qt-app) .btn-default:hover, :where(.qt-app) .btn-default:focus {
	color: var(--qt-ink) !important;
	background: var(--qt-surface3);
	border: none;
	box-shadow: none;
	transform: translateY(1px);
}
:where(.qt-app) .btn-default:disabled {
	color: var(--qt-on-brand);
	background: var(--qt-brand);
	border: none;
	opacity: 1;
	cursor: default;
	box-shadow: none;
	transform: translateY(1px);
}
:where(.qt-app) .container-fluid { padding-left: 0; padding-right: 0; }

:where(.qt-app) .table-responsive { border: 0px; }
:where(.qt-app) .content-card {
	background: var(--qt-surface);
	border: none;
	border-radius: var(--qt-radius-xl);
	padding: 30px;
	margin: 20px auto;
	max-width: 900px;
	box-shadow: var(--qt-shadow-card);
}
:where(.qt-app) .table>tbody>tr>td, :where(.qt-app) .table>tbody>tr>th, :where(.qt-app) .table>tfoot>tr>td, :where(.qt-app) .table>tfoot>tr>th, :where(.qt-app) .table>thead>tr>td, :where(.qt-app) .table>thead>tr>th {
	border-top: none !important;
	vertical-align: middle;
	color: var(--qt-ink);
}
.qt-app hr {
	height: 1px;
	color: var(--qt-hairline);
	background-color: var(--qt-hairline);
	border: none;
	width: 15vmin;
	margin: 20px auto;
}

/* credits */
:where(.qt-app) #credits-container { max-width: 600px; margin: 0 auto; padding: 24px 0 40px 0; }
.qt-app .credits-header { text-align: center; font-weight: 700; margin-bottom: 24px; color: var(--qt-ink); }
.qt-app .credits-text { font-size: 15px; line-height: 1.6; color: var(--qt-ink); text-align: left; margin-bottom: 20px; }
.qt-app .credits-loading { text-align: center; color: var(--qt-ink2); }

/* game type selector */
:where(.qt-app) .game-selector { display: flex; justify-content: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
:where(.qt-app) .btn-game {
	font-size: 15px;
	font-weight: 700;
	font-family: var(--qt-font-body);
	color: var(--qt-ink2);
	background: var(--qt-surface2);
	border: none;
	border-radius: var(--qt-radius-pill);
	padding: 8px 20px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: none;
}
:where(.qt-app) .btn-game:hover, :where(.qt-app) .btn-game:focus { background: var(--qt-surface3); color: var(--qt-ink); border: none; transform: translateY(1px); box-shadow: none; }
:where(.qt-app) .btn-game.active { background: var(--qt-brand); color: var(--qt-on-brand); border: none; cursor: default; transform: translateY(1px); box-shadow: none; }

/* ---------- /get/ and /events/join/: QR on a computer, the one store for this phone ---------- */
.qt-get, .qt-join { width: 100%; display: flex; flex-direction: column; align-items: center; }
.qt-get .qr-container, .qt-join .qr-container { display: none; }
.qt-get .qr-container.visible, .qt-join .qr-container.visible { display: block; }
.qr-code { background: #FFFFFF; padding: 12px; border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--c-line); display: inline-block; margin-bottom: var(--sp-4); line-height: 0; }
.qr-code img { width: 160px; height: 160px; display: block; }
.qt-join .qr-code img { width: 140px; height: 140px; }
.qr-hint { font-size: var(--fs-sm); color: var(--c-muted); }
.qt-get .mobile-buttons { display: none; }
.qt-get .mobile-buttons.visible { display: flex; flex-direction: column; gap: var(--sp-4); align-items: center; }
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 40px; width: auto; }
/* /get/: the price line under the tag line (free, no ads, no purchases) */
.qt-free { margin: 0; color: var(--c-ink); }

/* /get/'s own store buttons in the closing section */
.qt-badges .badges { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }
.qt-badges .badges a { display: block; line-height: 0; }
.qt-badges .badges img { height: 48px; width: auto; display: block; }
.fr-closing .qt-home { margin-top: var(--sp-5); margin-inline: auto; }

/* /events/join/ */
.qt-join .join-code {
	font-family: var(--f-display);
	font-size: 3rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--c-brand-ink);
	letter-spacing: 0.15em;
	margin-bottom: var(--sp-5);
	padding: var(--sp-4) var(--sp-5);
	background: var(--c-surface-2);
	border-radius: var(--r-card);
	max-width: 100%;
	overflow-wrap: anywhere;
}
.qt-join .no-code { color: var(--c-muted); font-style: italic; font-size: 1.5rem; letter-spacing: normal; }
.qt-join .instructions { color: var(--c-muted); margin-bottom: var(--sp-5); }
.qt-join .store-badges { display: flex; gap: var(--sp-3); justify-content: center; align-items: center; flex-wrap: wrap; }
.qt-join .store-badges img { height: 44px; }
.qt-join .mobile-message { display: none; }
.qt-join .mobile-message.visible { display: block; }
.qt-join .open-app-btn {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap);
	background: var(--c-brand);
	color: var(--c-on-brand) !important;
	font-weight: var(--fw-strong);
	padding: 0 var(--sp-6);
	border-radius: var(--r-button);
	text-decoration: none !important;
	margin-bottom: var(--sp-4);
}
.qt-join .or-divider { font-size: var(--fs-sm); color: var(--c-muted); margin: var(--sp-4) 0; }

/* /serata/: the request button wraps instead of running off a phone at large text sizes */
.qt-contact .fr-btn { white-space: normal; text-align: center; padding-block: var(--sp-2); }
