/**
 * PLUMIER app — bridge, upload, critique result, history.
 * Loaded with quiz.css (shell + transitions) and card.css on the Plumier App template.
 */

.pa-top { justify-content: space-between; }
.pa-brand { font-weight: 800; letter-spacing: .16em; font-size: 13px; color: var(--ink); display: inline-flex; align-items: center; }
.pa-brand img { height: 20px; width: auto; display: block; }
.pa-home-btn { appearance: none; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.pa-top-right { display: flex; align-items: center; gap: 12px; }
.pa-remaining { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.pa-avatar {
	appearance: none; cursor: pointer;
	width: 34px; height: 34px; flex: 0 0 auto;
	border-radius: var(--radius-pill);
	border: 1px solid var(--line-strong);
	background: linear-gradient(135deg, var(--accent-soft), var(--accent) 70%);
	color: #fff; font-weight: 800; font-size: 12.5px; letter-spacing: .02em;
	display: grid; place-items: center;
	transition: transform .18s var(--ease), box-shadow .2s;
}
.pa-avatar:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -6px rgba(196,98,45,.7); }

/* Profile / account screen */
.pa-profile { align-items: stretch; }
.pa-pf-head { text-align: center; padding: 8px 0 22px; }
.pa-pf-avatar {
	width: 74px; height: 74px; margin: 0 auto 14px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent-soft), var(--accent) 70%);
	color: #fff; font-weight: 800; font-size: 26px;
	display: grid; place-items: center;
	box-shadow: 0 0 46px -8px rgba(196,98,45,.55);
}
.pa-pf-name { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); }
.pa-pf-email { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.pa-pf-arche {
	display: inline-flex; align-items: center; gap: 10px;
	margin: 14px auto 0; padding: 8px 16px;
	border-radius: var(--radius-pill);
	background: rgba(196,98,45,.14); color: var(--accent-soft);
	font-family: var(--font-serif); font-style: italic; font-size: 15px;
}
.pa-pf-arche.is-tappable {
	appearance: none; border: 1px solid rgba(196,98,45,.3); cursor: pointer;
	transition: background .2s, border-color .2s, transform .18s var(--ease);
}
.pa-pf-arche.is-tappable:hover { background: rgba(196,98,45,.22); border-color: var(--accent); transform: translateY(-1px); }
.pa-pf-arche-go {
	font-family: var(--font-sans); font-style: normal; font-weight: 700;
	font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
	color: var(--accent); white-space: nowrap;
}

/* Identity-card modal */
.pa-modal {
	position: fixed; inset: 0; z-index: 200;
	display: flex; align-items: center; justify-content: center;
	padding: 22px;
	background: rgba(6,12,9,.72);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	opacity: 0; transition: opacity .26s var(--ease);
	overflow-y: auto;
}
.pa-modal.is-open { opacity: 1; }
.pa-modal-inner {
	position: relative; width: 100%; max-width: 420px;
	display: flex; flex-direction: column; gap: 14px;
	transform: translateY(10px) scale(.98); transition: transform .3s var(--ease);
}
.pa-modal.is-open .pa-modal-inner { transform: none; }
.pa-modal-close {
	position: absolute; top: -6px; right: 0; transform: translateY(-100%);
	appearance: none; border: none; background: none; cursor: pointer;
	color: var(--ink); font-size: 30px; line-height: 1; padding: 4px 8px; opacity: .8;
}
.pa-modal-close:hover { opacity: 1; }
.pa-modal .pq-fullcard { margin: 0; }
.pa-modal .pq-share { width: 100%; }
@media (prefers-reduced-motion: reduce) {
	.pa-modal, .pa-modal-inner { transition: none; }
}
.pa-pf-stats { display: flex; gap: 12px; margin-bottom: 16px; }
.pa-pf-stat {
	flex: 1 1 0; text-align: center;
	background: var(--bg-2); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 16px 10px;
}
.pa-pf-stat b { display: block; font-size: 20px; color: var(--ink); font-weight: 800; line-height: 1.1; }
.pa-pf-stat span { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.pa-pf-rows { list-style: none; margin: 0 0 4px; padding: 0; }
.pa-pf-rows li {
	display: flex; justify-content: space-between; align-items: center;
	padding: 14px 2px; border-bottom: 1px solid var(--line);
	font-size: 14px;
}
.pa-pf-rows li span { color: var(--muted); }
.pa-pf-rows li b { color: var(--ink); font-weight: 600; }
.pa-pf-logout {
	text-align: center; text-decoration: none;
	color: var(--muted); font-size: 13.5px; letter-spacing: .02em;
	padding: 12px; border-radius: var(--radius-pill);
	border: 1px solid var(--line); transition: color .2s, border-color .2s;
}
.pa-pf-logout:hover { color: #d98a5c; border-color: var(--line-strong); }

/* Bridge */
.pa-bridge { align-items: center; justify-content: center; text-align: center; }
.pa-bridge h1 {
	font-size: 26px; font-weight: 800; line-height: 1.2; margin: 0 0 14px; letter-spacing: -.01em;
}
.pa-bridge p { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 26px; max-width: 34ch; }

/* Upload trigger */
.pa-upload {
	width: 100%; max-width: 420px;
	border: 1.5px dashed var(--line-strong);
	background: var(--bg-2);
	border-radius: var(--radius-lg);
	padding: 30px 20px; text-align: center; cursor: pointer;
	transition: border-color .2s, background .2s;
}
.pa-upload:hover { border-color: var(--accent); }
.pa-upload .pa-up-ico { font-size: 30px; }
.pa-upload p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.pa-file { display: none; }

/* Result */
.pa-result { align-items: stretch; }
.pa-hook {
	font-family: var(--font-serif); font-style: italic;
	font-size: 21px; line-height: 1.35; color: var(--ink);
	margin: 6px 0 18px; text-align: center;
}
.pa-photo {
	width: 100%; max-width: 260px; margin: 0 auto 20px; display: block;
	border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.pa-block { background: var(--card); color: var(--card-ink); border-radius: var(--radius); padding: 18px 18px; margin-bottom: 12px; }
.pa-reading { font-size: 14.5px; line-height: 1.6; color: #3f3a2f; margin: 0; }

/* Score bars */
.pa-bars { display: flex; flex-direction: column; gap: 14px; }
.pa-bar-label { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; color: var(--card-ink); }
.pa-bar-label b { font-variant-numeric: tabular-nums; }
.pa-track { background: #e2d7c2; border-radius: var(--radius-pill); height: 9px; overflow: hidden; }
.pa-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .9s var(--ease); }

.pa-list { margin: 0; padding: 0; list-style: none; }
.pa-list li { position: relative; padding-left: 20px; margin: 0 0 9px; font-size: 14px; line-height: 1.5; color: #3f3a2f; }
.pa-list li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }

.pa-calib { font-size: 14.5px; line-height: 1.6; color: #3f3a2f; margin: 0; }
.pa-label-line { text-align: center; margin: 4px 0 2px; }
.pa-chip {
	display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill);
	background: rgba(196,98,45,.14); color: #9a4a20; font-size: 12px; font-weight: 700; letter-spacing: .03em;
}
.pa-callback { font-family: var(--font-serif); font-style: italic; text-align: center; color: var(--muted); font-size: 15px; margin: 14px 0 0; }

.pa-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* History */
.pa-history-h { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
.pa-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pa-thumb { position: relative; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: none; padding: 0; cursor: pointer; }
.pa-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pa-thumb span { position: absolute; left: 6px; bottom: 5px; color: #fff; font-size: 10px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* Paywall + gate */
.pa-center { align-items: center; justify-content: center; text-align: center; }
.pa-center h2 { font-size: 22px; font-weight: 800; margin: 0 0 10px; }
.pa-center p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 20px; max-width: 32ch; }

.pa-sample-badge {
	display: inline-block; margin: 0 auto 14px; padding: 4px 10px; border-radius: var(--radius-pill);
	background: rgba(196,98,45,.12); color: #9a4a20; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

/* ============ Visual result (animated) ============ */
.pa-vr { align-items: stretch; gap: 0; }
.pa-vr > * { animation: vr-in .5s var(--ease) both; }
@keyframes vr-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.vr-hero { position: relative; margin: 2px auto 18px; width: 100%; max-width: 300px; }
.vr-photo {
	display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
	border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
	background: var(--bg-2);
}
.vr-score {
	position: absolute; right: -6px; bottom: -12px;
	display: flex; align-items: baseline; gap: 2px;
	padding: 12px 16px; border-radius: 16px;
	background: linear-gradient(135deg, #12241a, #08120c);
	border: 1px solid var(--line-strong);
	box-shadow: 0 14px 34px -12px rgba(0,0,0,.8);
}
.vr-score-n { font-family: var(--font-serif); font-style: italic; font-size: 34px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.vr-score-d { font-size: 13px; color: var(--muted); }

.vr-hook {
	font-family: var(--font-serif); font-style: italic;
	font-size: 20px; line-height: 1.35; color: var(--ink);
	text-align: center; margin: 6px 0 20px;
}

.vr-rings { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.vr-ring { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vr-ring svg { transform: rotate(-90deg); }
.vr-ring-bg { fill: none; stroke: rgba(243,239,230,.12); stroke-width: 5; }
.vr-ring-fg { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .95s var(--ease); }
.vr-ring-n { position: absolute; top: 0; left: 0; width: 100%; height: 64px; display: grid; place-items: center; font-size: 19px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.vr-ring-l { font-size: 11px; color: var(--muted); letter-spacing: .03em; }

.vr-palette { margin-bottom: 18px; }
.vr-cap { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.vr-swatches { display: flex; gap: 8px; }
.vr-sw { flex: 1 1 0; height: 40px; border-radius: 10px; border: 1px solid rgba(243,239,230,.14); animation: vr-pop .5s var(--ease) both; }
@keyframes vr-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

.vr-move { background: var(--card); color: var(--card-ink); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.vr-move .vr-cap { color: var(--accent); margin-bottom: 6px; }
.vr-move p { margin: 0; font-size: 15px; line-height: 1.55; color: #3f3a2f; }

.vr-wins { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vr-wins li { position: relative; padding-left: 24px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.vr-wins li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--good); font-weight: 700; }

.vr-label { text-align: center; margin-bottom: 6px; }

.vr-toggle {
	display: block; margin: 8px auto 0; padding: 8px 6px;
	background: none; border: none; cursor: pointer;
	color: var(--muted); font-size: 13px; font-family: inherit; letter-spacing: .02em;
}
.vr-toggle:hover { color: var(--ink); }
.vr-more { margin-top: 6px; }
.vr-more p { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 10px; }
.vr-callback { font-family: var(--font-serif); font-style: italic; color: var(--accent-soft) !important; }

.pq-cta-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.pq-cta-ghost:hover { background: var(--bg-2); }

@media (prefers-reduced-motion: reduce) {
	.pa-vr > *, .vr-sw { animation: none; }
	.vr-ring-fg { transition: none; }
}

/* ---- result share image (9:16 branded frame) ---- */
.vr-share-frame { justify-content: flex-start; gap: 14px; }
.vrs-body { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.vrs-photo { width: 130px; aspect-ratio: 3/4; object-fit: cover; border-radius: 16px; align-self: center; box-shadow: 0 14px 34px -14px rgba(0,0,0,.7); }
.vrs-score { text-align: center; }
.vrs-score b { font-family: var(--font-serif); font-style: italic; font-size: 46px; color: #f3efe6; }
.vrs-score span { font-size: 16px; color: #9aa79c; }
.vrs-hook { font-family: var(--font-serif); font-style: italic; font-size: 16px; line-height: 1.4; color: #f3efe6; text-align: center; margin: 0 4px; }
.vrs-bars { display: flex; flex-direction: column; gap: 9px; margin: 2px 2px 0; }
.vrs-bar-t { display: flex; justify-content: space-between; font-size: 12px; color: #cfc8ba; margin-bottom: 4px; }
.vrs-bar-t b { color: #f3efe6; }
.vrs-track { height: 8px; border-radius: 999px; background: rgba(243,239,230,.14); overflow: hidden; }
.vrs-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #e0956b, #c4622d); }
.vrs-swatches { display: flex; gap: 7px; margin: 2px 2px 0; }
.vrs-swatches span { flex: 1 1 0; height: 30px; border-radius: 8px; border: 1px solid rgba(243,239,230,.14); }
.vrs-label { text-align: center; margin-top: 2px; }
