/* Tarot Gold Codex — app chrome (on top of tarot-theme.css) */

#veil{position:fixed;inset:0;z-index:80;display:flex;flex-direction:column;gap:18px;align-items:center;justify-content:center;
  background:rgba(9,8,13,.94);transition:opacity .7s ease;}
#veil.off{opacity:0;pointer-events:none;}
#veilBox{width:92px;height:92px;}
#veilTxt{margin:0;font-family:var(--mono);font-size:10px;letter-spacing:.42em;color:var(--gold-dim);text-transform:uppercase;}

.wrap-app{width:min(1380px,96vw);margin:0 auto;position:relative;z-index:2;}

.top-controls{position:fixed;top:14px;right:16px;z-index:40;display:flex;gap:8px;}
.top-controls .ghost{backdrop-filter:blur(4px);}

.mock-note{display:flex;justify-content:center;margin:-6px 0 18px;}

/* grids: fluid columns so any node count / viewport lays out well */
#deck.spread{grid-template-columns:repeat(3,minmax(0,1fr));}
@media (max-width:1080px){#deck.spread{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:720px){#deck.spread{grid-template-columns:minmax(0,1fr);}}
.altar.spread{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));justify-content:center;}
.altar .subtitle{white-space:nowrap;font-size:10px;}
.tabs .tab{white-space:nowrap;}
.mock-note .badge{white-space:nowrap;}

/* altar */
.altar{margin-bottom:16px;}
.altar .tcard{cursor:default;}
.gwrap{max-width:190px;margin:0 auto;}
.rates-strip{margin-top:14px;display:flex;justify-content:space-between;align-items:baseline;gap:18px;flex-wrap:wrap;
  font-family:var(--mono);font-size:11px;letter-spacing:.12em;color:var(--muted);}
.rates-strip b{color:var(--gold-bright);font-weight:400;}

.deckbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin:20px 0 18px;}
.deckbar .tabs{margin:0;}
.deckbar .seg{max-width:230px;min-width:200px;}

/* flip cards */
.flip-wrap{perspective:1500px;cursor:pointer;height:var(--card-h,460px);}
.flip-inner{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform .75s cubic-bezier(.3,.85,.35,1);}
.flip-wrap.flipped .flip-inner{transform:rotateY(180deg);}
.face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;
  transition:opacity .16s linear .2s;}
.flip-wrap .face--back{opacity:0;pointer-events:none;}
.flip-wrap.flipped .face--back{opacity:1;pointer-events:auto;}
.flip-wrap.flipped .face--front{opacity:0;pointer-events:none;}
.face--back{transform:rotateY(180deg);}
.face .tcard{min-height:0;height:100%;}
.face--front .tcard{display:flex;flex-direction:column;justify-content:space-evenly;padding:24px 18px 16px;}
.face--front .foot{margin-top:0;}
.face--back .tcard{padding:16px 18px 12px;text-align:left;display:flex;flex-direction:column;justify-content:center;}
.face--front .emblem{width:112px;height:112px;}
.sealed-card{cursor:default;}
.sealed-card .tcard{display:flex;flex-direction:column;justify-content:space-evenly;padding:24px 18px 16px;min-height:0;height:100%;}
.sealed-card .emblem{width:112px;height:112px;}

.mrow{display:flex;justify-content:space-between;align-items:baseline;font-family:var(--mono);}
.mrow .k{font-size:10px;letter-spacing:.14em;color:var(--muted);text-transform:uppercase;}
.mrow .v{font-size:12px;color:var(--gold-bright);}
.mrow .v small{font-size:9px;color:var(--gold-dim);}
.pstrip{margin-top:6px;line-height:1;white-space:nowrap;overflow:hidden;font-size:8px;letter-spacing:.34em;}
.pstrip i{font-style:normal;color:var(--ok);}
.pstrip i.bad{color:var(--danger);}
.quota-dust{margin-top:2px;}

/* ledger view */
.ledger-note{margin-top:16px;}
.ttable .microbar{display:inline-block;width:40px;height:1px;vertical-align:2px;margin-left:7px;}
.ttable tr[data-uuid]{cursor:pointer;}
.ttable tr.sealed-row{opacity:.45;filter:grayscale(.6);}

/* detail */
.det-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:12px;flex-wrap:wrap;}
.det-grid{display:grid;grid-template-columns:1fr 1fr 1fr 1.3fr;gap:14px;margin-bottom:14px;}
.det-charts{display:grid;grid-template-columns:1.35fr 1fr;gap:14px;}
.specs{font-family:var(--mono);font-size:10.5px;letter-spacing:.08em;color:var(--muted);line-height:2.15;text-align:left;}
.specs>div{display:flex;justify-content:space-between;gap:12px;}
.specs b{color:var(--gold-bright);font-weight:400;text-align:right;}
.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;flex-wrap:wrap;gap:10px;}
.panel-head .subtitle{margin:0;text-align:left;}
.panel-head .tabs{margin:0;}

@media (max-width:1020px){
  .det-grid{grid-template-columns:1fr 1fr;}
  .det-charts{grid-template-columns:1fr;}
}
@media (max-width:760px){
  .top-controls{position:absolute;}
  .flip-wrap{--card-h:auto;height:auto;min-height:430px;}
  .deckbar{justify-content:center;}
}
@media (prefers-reduced-motion:reduce){
  .flip-inner{transition:none;}
  .face{transition:none;}
}
