/* Tarot House Cards & Decks structural v11 migration. Scoped exclusively to #th-v11-entry. */
#th-v11-entry .th11-cards-tabs{margin:0 0 22px;width:max-content;max-width:100%}
#th-v11-entry .th11-cards-toolbar{align-items:end;margin-bottom:16px;gap:14px}
#th-v11-entry .th11-cards-toolbar .label{margin:0;min-width:170px;max-width:290px;flex:1}
#th-v11-entry .th11-cards-toolbar .field{display:block;width:100%;margin-top:5px}
#th-v11-entry .th11-cards-filters{margin:0;min-width:0}
#th-v11-entry .th11-tarot-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:-2px 0 17px;padding:14px;border:1px solid var(--edge);border-radius:12px;background:var(--panel)}
#th-v11-entry .th11-tarot-filters[hidden]{display:none!important}
#th-v11-entry .th11-tarot-filters label{min-width:0;color:var(--muted);font:700 11px/1.3 var(--ui);letter-spacing:.04em;text-transform:uppercase}
#th-v11-entry .th11-tarot-filters select{display:block;width:100%;min-height:42px;margin-top:6px;padding:8px 10px;color:var(--ink);background:var(--cream);border:1px solid var(--edge);border-radius:8px;font:14px var(--ui);letter-spacing:normal;text-transform:none}
#th-v11-entry .th11-real-gallery{display:block;position:relative;inset:auto;transform:none;z-index:auto;float:none;max-width:none;min-width:0;max-height:none;width:100%;height:auto;margin:0;border:0;background:transparent!important;background-image:none!important;box-shadow:none!important;filter:none!important;overflow:visible;padding:0;color:var(--ink);font:inherit}
#th-v11-entry .th11-real-gallery .gallery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;background:var(--panel);border:1px solid var(--edge);border-radius:15px;padding:19px;margin-bottom:9px;box-shadow:var(--shadow)}
#th-v11-entry .th11-real-gallery .gallery-heading{min-width:0;flex:1 1 310px;text-align:left}
#th-v11-entry .th11-real-gallery .gallery-heading .eyebrow{color:#967343;font-size:10px;line-height:1.4;letter-spacing:2px}
#th-v11-entry .th11-real-gallery .gallery-heading h2{font:30px/1.15 var(--serif);color:var(--ink);letter-spacing:0;margin:3px 0 5px}
#th-v11-entry .th11-real-gallery .gallery-heading p{font:13px/1.55 var(--ui);color:var(--muted);margin:0;max-width:700px}
#th-v11-entry .th11-real-gallery .gallery-deck-field{flex:0 1 305px;display:block;width:305px;max-width:100%;margin:0;padding:0;border:0;background:transparent;box-shadow:none}
#th-v11-entry .th11-real-gallery .gallery-deck-field label{display:block;color:var(--ink);font:700 12px/1.3 var(--ui);margin-bottom:7px}
#th-v11-entry .th11-real-gallery .gallery-deck-field select{width:100%;height:auto;min-height:43px;padding:9px 11px;border:1px solid var(--edge);border-radius:9px;background:var(--panel);color:var(--ink);font:14px var(--ui)}
#th-v11-entry .th11-real-gallery .gallery-collection-status{color:var(--muted);font:13px/1.55 var(--ui);padding:4px 2px 13px;margin:0}
#th-v11-entry .th11-real-gallery .gallery-grid.cards-gallery{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr))!important;align-items:stretch;gap:clamp(9px,1vw,16px)!important;max-width:none;margin:0;padding:0;overflow:visible}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-width:0;max-width:none;width:100%;height:auto;padding:8px 7px;background:var(--panel);border:1px solid var(--edge);border-radius:11px;box-shadow:var(--shadow);color:var(--ink);cursor:pointer;transform:none;transition:border-color .15s ease,box-shadow .15s ease}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card:hover:not(:disabled){border-color:var(--gold);box-shadow:0 7px 22px #513f2b25;transform:translateY(-2px)}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card img{display:block;width:100%;max-width:none;height:auto;aspect-ratio:auto;object-fit:contain;flex:0 0 auto;margin:0 auto 10px;border-radius:6px;background:transparent;border:1px solid #9d866660;box-shadow:0 5px 12px #231d2050}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card .gallery-card-meta{display:block;min-width:0;width:100%;background:none;border:0;box-shadow:none;text-align:center;color:var(--ink);font:13px/1.3 var(--serif)}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card .gallery-card-meta strong{display:block;color:var(--ink);font:600 15px/1.2 var(--serif);overflow-wrap:anywhere}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card .gallery-card-meta small{display:block;margin-top:4px;color:var(--muted);font:11px/1.25 var(--ui);overflow-wrap:anywhere}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card.gallery-card--locked{opacity:1;filter:none;background:var(--cream);border-style:dashed;cursor:not-allowed}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card.gallery-card--locked img{filter:grayscale(1) brightness(.63);opacity:.7}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card.gallery-card--locked::after{content:none}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card[hidden],#th-v11-entry .th11-real-gallery .gallery-grid .gallery-type-heading[hidden]{display:none!important}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-type-heading{grid-column:1/-1;display:flex;align-items:center;gap:10px;color:var(--ink);background:var(--cream);border:1px solid var(--edge);border-radius:11px;margin:6px 0 0;padding:10px 14px}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-type-heading strong{display:block;font:20px var(--serif)}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-type-heading small{display:block;font:11px var(--ui);color:var(--muted)}
#th-v11-entry .th11-real-gallery .gallery-grid .gallery-type-letter{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--gold);font:18px var(--serif)}
#th-v11-entry .th11-cards-result-count{margin:12px 0 20px}
#th-v11-entry .th11-deck-record{align-items:start;min-width:0;gap:13px;background:var(--panel);color:var(--ink);border-color:var(--edge);box-shadow:var(--shadow);height:100%}
#th-v11-entry .th11-deck-record>img{flex:0 0 66px;width:66px;height:106px;object-fit:cover;object-position:center;border:1px solid var(--gold);border-radius:6px}
#th-v11-entry .th11-deck-body{min-width:0;flex:1}
#th-v11-entry .th11-deck-body h3{font:21px/1.15 var(--serif);margin:0 0 6px;color:var(--ink)}
#th-v11-entry .th11-deck-body p{font:12px/1.45 var(--ui);margin:0;color:var(--muted)}
#th-v11-entry .th11-deck-body .progress{margin:11px 0 9px;background:var(--cream);border:1px solid var(--edge)}
#th-v11-entry .th11-deck-body .progress>span{background:linear-gradient(90deg,var(--deep),var(--gold))}
#th-v11-entry .th11-deck-body .button-group{align-items:center;justify-content:space-between}
#th-v11-entry .th11-deck-body .btn:disabled{opacity:.5}
#th-v11-entry .th11-shop-preview{margin:20px 0}
#th-v11-entry .th11-shop-preview .btn{margin-top:14px}
#th-v11-entry .th11-shop-preview .deck-row{padding:0 12px}
#th-v11-entry .th11-shop-preview .deck-row img{height:125px;width:80px;object-fit:cover}
#th-v11-entry[data-ui-theme="dark"] .th11-real-gallery .gallery-grid .gallery-card.gallery-card--locked{background:#1d1427}
#th-v11-entry[data-ui-theme="dark"] .th11-real-gallery .gallery-grid .gallery-card.gallery-card--locked img{opacity:.75}
#th-v11-entry[data-ui-theme="dark"] .th11-real-gallery .gallery-grid .gallery-type-heading{background:var(--cream)}
@media(max-width:1250px){#th-v11-entry #th11OwnedDeckGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:920px){#th-v11-entry #th11OwnedDeckGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){#th-v11-entry .th11-cards-toolbar{display:flex;flex-direction:column;align-items:stretch}#th-v11-entry .th11-cards-filters{width:100%;justify-content:center}#th-v11-entry .th11-cards-toolbar .label{max-width:none;width:100%;flex:auto}#th-v11-entry .th11-tarot-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#th-v11-entry .th11-tarot-filters label:last-child{grid-column:1/-1}#th-v11-entry .th11-real-gallery .gallery-grid.cards-gallery{grid-template-columns:repeat(auto-fill,minmax(min(100%,145px),1fr))!important}#th-v11-entry .th11-real-gallery .gallery-toolbar{padding:15px}#th-v11-entry .th11-real-gallery .gallery-heading h2{font-size:26px}#th-v11-entry .th11-real-gallery .gallery-deck-field{flex:1 1 100%;width:100%}#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card{padding:7px 5px}#th-v11-entry .th11-real-gallery .gallery-grid .gallery-card .gallery-card-meta strong{font-size:13px}#th-v11-entry #th11OwnedDeckGrid{grid-template-columns:1fr}#th-v11-entry .th11-deck-record>img{width:56px;height:88px;flex-basis:56px}}
@media(max-width:380px){#th-v11-entry .th11-real-gallery .gallery-grid.cards-gallery{grid-template-columns:repeat(auto-fill,minmax(min(100%,115px),1fr))!important}#th-v11-entry .th11-cards-tabs{width:100%}#th-v11-entry .th11-cards-tabs button{flex:1}#th-v11-entry .th11-shop-preview .deck-row{display:none}}

/* Put deck selection before search/facets, using the original live controls. */
#th-v11-entry .th11-gallery-deck-panel{margin-bottom:18px}
#th-v11-entry .th11-gallery-deck-panel .gallery-toolbar{align-items:flex-start;margin-bottom:0}
#th-v11-entry .th11-gallery-deck-panel .gallery-deck-field{order:-1;position:relative;left:0;top:0;flex-basis:325px;width:325px}
#th-v11-entry .th11-gallery-deck-panel .gallery-deck-field label{font-size:14px;color:var(--deep)}
#th-v11-entry .th11-gallery-deck-panel .gallery-deck-field select{min-height:48px;border-color:var(--gold);font-size:15px}
@media(max-width:760px){#th-v11-entry .th11-gallery-deck-panel .gallery-deck-field{flex:1 1 100%;width:100%}}
