<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><title>Tarot Table with Log</title><style>:root{--card-width:100px;--card-height:170px;--bg-color:#1a1a1a;--card-back-pattern:repeating-linear-gradient(45deg,#2c3e50,#2c3e5010px,#34495e10px,#34495e20px);--accent-color:#f1c40f;--panel-bg:#262626;}body{font-family:'Georgia',serif;background-color:var(--bg-color);color:#ecf0f1;margin:0;padding:20px;}/* --- STICKY DASHBOARD --- */.dashboard{position:sticky;top:10px;z-index:1000;background-color:var(--panel-bg);padding:20px;border-radius:12px;box-shadow:010px30pxrgba(0,0,0,0.8);max-width:800px;margin:0auto30pxauto;display:flex;flex-direction:column;gap:15px;}.controls{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;}/* --- THE LOG AREA --- */.log-container{width:100%;}#reading-log{width:100%;height:80px;background:#111;color:var(--accent-color);border:1pxsolid#444;border-radius:6px;padding:10px;font-family:'Courier New',monospace;resize:none;box-sizing:border-box;}button{background-color:var(--accent-color);border:none;padding:10px20px;font-size:0.9rem;cursor:pointer;border-radius:6px;color:#1a1a1a;font-weight:800;transition:all0.2s;}button.secondary{background-color:#444;color:white;}button:hover{opacity:0.9;transform:translateY(-2px);}/* --- THE GRID LAYOUT --- */.card-spread{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--card-width),1fr));gap:15px;width:100%;max-width:1200px;margin:0auto;perspective:1000px;}/* --- CARD STYLES --- */.card{height:var(--card-height);border-radius:8px;cursor:pointer;position:relative;transition:transform0.6s;transform-style:preserve-3d;box-shadow:04px8pxrgba(0,0,0,0.5);}.card.flipped{transform:rotateY(180deg);cursor:default;}.card-face{position:absolute;width:100%;height:100%;backface-visibility:hidden;border-radius:8px;overflow:hidden;border:2pxsolid#34495e;box-sizing:border-box;}.card-back{background:var(--card-back-pattern);}.card-front{background-color:#fff;color:#222;transform:rotateY(180deg);display:flex;align-items:center;justify-content:center;text-align:center;}.card-img{width:100%;height:100%;object-fit:cover;display:block;}.card-text{display:none;padding:10px;font-size:0.8rem;font-weight:bold;}/* Fallback */.card-front.image-failed.card-img{display:none;}.card-front.image-failed.card-text{display:block;}</style></head><body><divclass="dashboard"><divclass="log-container"><textareaid="reading-log"readonlyplaceholder="Your drawn cards will appear here..."></textarea></div><divclass="controls"><buttononclick="initTable()">Reshuffle Deck</button><buttonclass="secondary"onclick="copyLog()">Copy Reading</button><buttonclass="secondary"onclick="clearLog()">Clear Log</button></div></div><divclass="card-spread"id="spread"></div><script>consttarotDeck=[{name:"The Fool",img:"the_fool.jpg"},{name:"The Magician",img:"the_magician.jpg"},{name:"The High Priestess",img:"the_high_priestess.jpg"},{name:"The Empress",img:"the_empress.jpg"},{name:"The Emperor",img:"the_emperor.jpg"},{name:"The Hierophant",img:"the_hierophant.jpg"},{name:"The Lovers",img:"the_lovers.jpg"},{name:"The Chariot",img:"the_chariot.jpg"},{name:"Strength",img:"strength.jpg"},{name:"The Hermit",img:"the_hermit.jpg"},{name:"Wheel of Fortune",img:"wheel_of_fortune.jpg"},{name:"Justice",img:"justice.jpg"},{name:"The Hanged Man",img:"the_hanged_man.jpg"},{name:"Death",img:"death.jpg"},{name:"Temperance",img:"temperance.jpg"},{name:"The Devil",img:"the_devil.jpg"},{name:"The Tower",img:"the_tower.jpg"},{name:"The Star",img:"the_star.jpg"},{name:"The Moon",img:"the_moon.jpg"},{name:"The Sun",img:"the_sun.jpg"},{name:"Judgement",img:"judgement.jpg"},{name:"The World",img:"the_world.jpg"},{name:"Ace of Wands",img:"ace_of_wands.jpg"},{name:"Two of Wands",img:"two_of_wands.jpg"},{name:"Three of Wands",img:"three_of_wands.jpg"},{name:"Four of Wands",img:"four_of_wands.jpg"},{name:"Five of Wands",img:"five_of_wands.jpg"},{name:"Six of Wands",img:"six_of_wands.jpg"},{name:"Seven of Wands",img:"seven_of_wands.jpg"},{name:"Eight of Wands",img:"eight_of_wands.jpg"},{name:"Nine of Wands",img:"nine_of_wands.jpg"},{name:"Ten of Wands",img:"ten_of_wands.jpg"},{name:"Page of Wands",img:"page_of_wands.jpg"},{name:"Knight of Wands",img:"knight_of_wands.jpg"},{name:"Queen of Wands",img:"queen_of_wands.jpg"},{name:"King of Wands",img:"king_of_wands.jpg"},{name:"Ace of Cups",img:"ace_of_cups.jpg"},{name:"Two of Cups",img:"two_of_cups.jpg"},{name:"Three of Cups",img:"three_of_cups.jpg"},{name:"Four of Cups",img:"four_of_cups.jpg"},{name:"Five of Cups",img:"five_of_cups.jpg"},{name:"Six of Cups",img:"six_of_cups.jpg"},{name:"Seven of Cups",img:"seven_of_cups.jpg"},{name:"Eight of Cups",img:"eight_of_cups.jpg"},{name:"Nine of Cups",img:"nine_of_cups.jpg"},{name:"Ten of Cups",img:"ten_of_cups.jpg"},{name:"Page of Cups",img:"page_of_cups.jpg"},{name:"Knight of Cups",img:"knight_of_cups.jpg"},{name:"Queen of Cups",img:"queen_of_cups.jpg"},{name:"King of Cups",img:"king_of_cups.jpg"},{name:"Ace of Swords",img:"ace_of_swords.jpg"},{name:"Two of Swords",img:"two_of_swords.jpg"},{name:"Three of Swords",img:"three_of_swords.jpg"},{name:"Four of Swords",img:"four_of_swords.jpg"},{name:"Five of Swords",img:"five_of_swords.jpg"},{name:"Six of Swords",img:"six_of_swords.jpg"},{name:"Seven of Swords",img:"seven_of_swords.jpg"},{name:"Eight of Swords",img:"eight_of_swords.jpg"},{name:"Nine of Swords",img:"nine_of_swords.jpg"},{name:"Ten of Swords",img:"ten_of_swords.jpg"},{name:"Page of Swords",img:"page_of_swords.jpg"},{name:"Knight of Swords",img:"knight_of_swords.jpg"},{name:"Queen of Swords",img:"queen_of_swords.jpg"},{name:"King of Swords",img:"king_of_swords.jpg"},{name:"Ace of Pentacles",img:"ace_of_pentacles.jpg"},{name:"Two of Pentacles",img:"two_of_pentacles.jpg"},{name:"Three of Pentacles",img:"three_of_pentacles.jpg"},{name:"Four of Pentacles",img:"four_of_pentacles.jpg"},{name:"Five of Pentacles",img:"five_of_pentacles.jpg"},{name:"Six of Pentacles",img:"six_of_pentacles.jpg"},{name:"Seven of Pentacles",img:"seven_of_pentacles.jpg"},{name:"Eight of Pentacles",img:"eight_of_pentacles.jpg"},{name:"Nine of Pentacles",img:"nine_of_pentacles.jpg"},{name:"Ten of Pentacles",img:"ten_of_pentacles.jpg"},{name:"Page of Pentacles",img:"page_of_pentacles.jpg"},{name:"Knight of Pentacles",img:"knight_of_pentacles.jpg"},{name:"Queen of Pentacles",img:"queen_of_pentacles.jpg"},{name:"King of Pentacles",img:"king_of_pentacles.jpg"}];constspreadContainer=document.getElementById('spread');constlogArea=document.getElementById('reading-log');functionshuffle(array){letcurrentIndex=array.length,randomIndex;while(currentIndex!=0){randomIndex=Math.floor(Math.random()*currentIndex);currentIndex--;[array[currentIndex],array[randomIndex]]=[array[randomIndex],array[currentIndex]];}returnarray;}functioninitTable(){spreadContainer.innerHTML='';constshuffledDeck=shuffle([...tarotDeck]);shuffledDeck.forEach(cardData=>{constcardEl=document.createElement('div');cardEl.classList.add('card');cardEl.innerHTML=`
<div class="card-face card-back"></div>
<div class="card-face card-front">
<img src="${cardData.img}" alt="${cardData.name}" class="card-img">
<h3 class="card-text">${cardData.name}</h3>
</div>
`;cardEl.addEventListener('click',function(){// If it's already flipped, don't do anythingif(this.classList.contains('flipped'))return;this.classList.add('flipped');// Add to the logappendToLog(cardData.name);});// Error fallback for imagesconstimgElement=cardEl.querySelector('.card-img');imgElement.addEventListener('error',function(){this.closest('.card-front').classList.add('image-failed');});spreadContainer.appendChild(cardEl);});}functionappendToLog(name){// Add name and a newlinelogArea.value+=name+"\n";// Auto-scroll to the bottom of the loglogArea.scrollTop=logArea.scrollHeight;}functionclearLog(){logArea.value="";}functioncopyLog(){if(logArea.value==="")return;logArea.select();document.execCommand('copy');alert("Reading copied to clipboard!");}initTable();</script></body></html>