Tarot readings: AI-written, drawn on the server, sold as units
CI / test (push) Successful in 1m29s
CI / build (push) Successful in 5m52s
CI / deploy (push) Skipped

A new Kártyajóslás page: choose a spread (1, 3 or 5 cards), ask a
question, pick the cards from the fanned deck and watch them turn over;
the reading is written by the detailed-analysis model from the cards,
their positions and base meanings, the question and the reader's Sun,
Moon and Ascendant. The server shuffles and draws, so nobody can draw
again for free. A reading is a 'tarot' analysis (worker, retries,
fallback, refunds and admin regeneration as for analyses), uses one
'tarot' unit, and survives recalculations; deleting the account
deletes it.

Packages carry 2/5/10 readings, the new +5 kártyajóslás addon costs
1 000 Ft. The card artwork comes from the tarot design studio
(celestial astrolabe style); the deck JSON is shared by the frontend
and the prompt. A public example is at /kartyajoslas/pelda.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-20 14:35:50 +00:00
co-authored by Claude Opus 5.5
parent 54af54cd39
commit b0fc547b73
36 changed files with 2957 additions and 46 deletions
+72
View File
@@ -964,3 +964,75 @@ a.pair-row:hover strong { color: var(--gold); }
@media (max-width: 640px) {
.invoice-table th:nth-child(3), .invoice-table td:nth-child(3) { display: none; }
}
/* Kártyajóslás */
.tarot { display: flex; flex-direction: column; gap: 24px; }
.tarot-card { display: block; width: 100%; height: auto; border-radius: 9px; user-select: none; }
.tarot-card-sm { width: 120px; flex: none; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); }
.tarot-card-xs { width: 30px; border-radius: 4px; }
.tarot-question { font-family: var(--font-display); font-size: 20px; font-style: italic; color: var(--ink-2); }
.tarot-spreads { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.tarot-spreads legend { margin-bottom: 8px; }
.tarot-spread {
display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; cursor: pointer;
border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); transition: border-color 0.15s;
}
.tarot-spread:hover { border-color: #5a6790; }
.tarot-spread.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.tarot-spread:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.tarot-spread-name { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.tarot-stage { align-items: stretch; }
.tarot-stage-head { display: flex; flex-direction: column; gap: 6px; text-align: center; align-items: center; }
.tarot-slots { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 20px; }
.tarot-slot { width: 132px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.tarot-slots[data-count="5"] .tarot-slot { width: 118px; }
.tarot-slot-title { font-size: 13px; font-weight: 600; color: var(--gold); line-height: 1.3; }
.tarot-slot-empty { width: 100%; aspect-ratio: 3 / 5; border: 1px dashed var(--line-2); border-radius: 9px; }
.tarot-flip { width: 100%; aspect-ratio: 3 / 5; perspective: 900px; }
.tarot-flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.75s cubic-bezier(0.3, 0.7, 0.3, 1); animation: tarot-land 0.35s ease-out; }
.tarot-flip.is-flipped .tarot-flip-inner { transform: rotateY(180deg); }
.tarot-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); }
.tarot-front { transform: rotateY(180deg); }
@keyframes tarot-land { from { transform: translateY(-18px); opacity: 0; } to { transform: none; opacity: 1; } }
/* The shuffled deck, fanned out: each card turns around a point far below. */
.tarot-fan { --w: 64px; --step: 4.2deg; position: relative; height: calc(var(--w) * 3.5); margin: 12px auto 0; width: 100%; max-width: 560px; overflow: visible; }
.tarot-fan-card {
position: absolute; left: calc(50% - var(--w) / 2); top: 12px; width: var(--w); padding: 0; border: 0; background: none; cursor: pointer;
transform-origin: 50% 330%; transform: rotate(calc(var(--i) * var(--step))); transition: transform 0.2s ease, opacity 0.25s ease;
}
.tarot-fan-card .tarot-card { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
.tarot-fan-card:hover:not(:disabled), .tarot-fan-card:focus-visible { transform: rotate(calc(var(--i) * var(--step))) translateY(-14px); }
.tarot-fan-card.is-picked { opacity: 0; transform: rotate(calc(var(--i) * var(--step))) translateY(-60px); cursor: default; }
.tarot-result { display: flex; flex-direction: column; gap: 28px; }
.tarot-result-head { display: flex; flex-direction: column; gap: 10px; }
.tarot-summary { font-size: 17px; color: var(--ink-2); }
.tarot-card-texts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.tarot-card-text { display: flex; gap: 22px; align-items: flex-start; }
.tarot-card-text-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tarot-synthesis, .tarot-advice { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 22px; }
.tarot-advice h3 { color: var(--gold); }
.tarot-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tarot-history li + li { border-top: 1px solid var(--line); }
.tarot-history-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; color: var(--ink); text-decoration: none; }
.tarot-history-row:hover strong { color: var(--gold); }
.tarot-history-cards { display: flex; gap: 3px; flex: none; }
.tarot-history-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
@media (max-width: 640px) {
.tarot-fan { --w: 46px; --step: 4deg; }
.tarot-slot { width: calc((100% - 40px) / 3); }
.tarot-slots[data-count="1"] .tarot-slot { width: 46%; }
.tarot-slots[data-count="5"] .tarot-slot { width: calc((100% - 40px) / 3); }
.tarot-card-text { flex-direction: column; align-items: center; }
.tarot-card-text-body { align-self: stretch; }
.tarot-history-cards .tarot-card-xs:nth-child(n + 4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.tarot-flip-inner, .tarot-fan-card { transition: none; animation: none; }
}