:root{--comfort-bg:#0d151b;--comfort-surface:#142129;--comfort-line:#30444f;--comfort-ink:#edf3f5;--comfort-muted:#a8bbc5;--comfort-accent:#9ddfcf}
html{scroll-padding-top:130px;scroll-behavior:smooth}body{background-color:var(--comfort-bg);color:var(--comfort-ink);line-height:1.65}*,*::before,*::after{box-sizing:border-box}button,input,select,textarea{font:inherit}button,a,input,select{touch-action:manipulation}:focus-visible{outline:3px solid var(--comfort-accent)!important;outline-offset:4px}button:disabled{cursor:default;opacity:.6}input[type=search]{font-size:16px;min-height:48px}input::placeholder{color:#9bafb9;opacity:1}select{max-width:100%;min-height:44px}p{line-height:1.75}.section-head p,.hero-copy p,.game-card p{color:var(--comfort-muted)}
.quick-tools{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:8px;padding:12px 16px;margin:14px auto 0;max-width:1320px;border:1px solid var(--comfort-line);border-radius:16px;background:rgba(17,29,37,.96);position:relative;top:auto;left:auto;right:auto;z-index:1;width:calc(100% - 28px);height:auto;min-height:0;box-shadow:0 10px 26px #0002;backdrop-filter:blur(12px)}.quick-tools strong{font-size:12px;letter-spacing:.1em;color:var(--comfort-muted);margin-right:auto}.quick-tools a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 16px;border-radius:10px;color:var(--comfort-ink);text-decoration:none;font-size:14px;font-weight:650;letter-spacing:.02em}.quick-tools a:first-of-type{background:var(--comfort-accent);color:#14252b}.quick-tools a:hover{background:#28434b;color:#f2fffb}.cross-search-hint{display:block;margin:8px 0 0;color:var(--comfort-muted);font-size:12px;letter-spacing:.02em}.back-to-top{position:fixed;bottom:22px;right:20px;z-index:60;width:46px;height:46px;border:1px solid #45616b;border-radius:50%;background:#172c35;color:var(--comfort-ink);box-shadow:0 6px 20px #0004;cursor:pointer;font-size:21px}
.game-card,.deck-card,.rogue-card,.source-card,.rule-card,.usage-ranking,.media-library{border-radius:18px}.game-card,.deck-card,.rogue-card{transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.game-card:hover,.deck-card:hover,.rogue-card:hover{box-shadow:0 12px 30px #0003}.game-card p{max-width:58ch}.deck-finder,.card-toolbar,.official-controls{border-radius:16px}.deck-finder input,.card-search input,.official-controls input{border-radius:12px}.clear-card-filters,.clear-card-filters button,.load-more{min-height:44px;border-radius:12px}.section-head{gap:20px}.section-head h2{line-height:1.2}.deck-modal-head h2,.modal-shell h2{line-height:1.3;overflow-wrap:anywhere}.modal-shell{border-radius:22px}.deck-list-picker .list-pick,.deck-list-picker>button{border-radius:12px;padding:14px;min-width:0}.deck-intel-panel{border-radius:16px}.card-badges{flex-wrap:wrap}.usage-controls{gap:10px;flex-wrap:wrap}.usage-controls select,.usage-controls input{min-height:44px;border-radius:10px}.event-strip{gap:12px}.event-strip span{min-width:0}.event-strip b{overflow-wrap:anywhere}
.home-hero{padding-top:clamp(44px,7vw,110px);padding-bottom:clamp(44px,6vw,90px)}.home-hero h1{line-height:.96}.game-grid{gap:24px}.game-card .game-footer,.game-card .game-cta{border-radius:0 0 18px 18px}.home-header,.site-header{background:rgba(13,21,27,.94);backdrop-filter:blur(14px)}
@media(max-width:760px){html{scroll-padding-top:132px}.quick-tools{position:relative;top:auto;left:auto;right:auto;flex-direction:row;flex-wrap:nowrap;width:calc(100% - 24px);margin:10px 12px 0;padding:8px;gap:4px;justify-content:space-between;border-radius:13px}.quick-tools strong{display:none}.quick-tools a{padding:8px 6px;font-size:13px;min-height:42px;flex:1 1 0;min-width:0;text-align:center;white-space:normal}.section-head{align-items:flex-start;gap:12px}.section-head p{font-size:13px}.modal-shell{border-radius:18px 18px 0 0}.back-to-top{width:42px;height:42px;right:14px;bottom:16px}.usage-controls select{flex:1 1 145px;min-width:0}.game-grid{gap:18px}.home-hero{padding-top:44px}.game-card{border-radius:16px}.game-card p{font-size:15px;line-height:1.7}.deck-list-picker .list-pick{padding:13px}.official-recipe-grid{gap:14px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
/* Shared quick access is independent of each game's mobile header menu. */
.quick-tools a{position:relative;inset:auto;transform:none;float:none;width:auto;height:auto;max-width:100%;margin:0}
.ua-deck-card{display:block;min-width:0;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.ua-deck-card .ua-list-card{height:100%}
.toast{max-width:min(92vw,480px);overflow-wrap:anywhere;line-height:1.5}
.quick-tools{padding:8px 12px;box-shadow:none;border-color:#2b414c}.quick-tools strong{font-size:11px}.quick-tools a{min-height:40px;padding:7px 15px}.quality-details{margin:16px 0;border:1px solid #2d424e;border-radius:13px;background:#101d25}.quality-details>summary{cursor:pointer;padding:12px 16px;color:#b8cdc9;font-size:13px;min-height:44px}.quality-details>#siteDataAudit{margin:0;border:0;border-top:1px solid #2d424e;border-radius:0 0 13px 13px}.deck-grid,.cards-grid{gap:18px}.source-card p,.rule-card p{max-width:70ch}.advanced-filters{border-radius:12px}body.modal-open .back-to-top,body:has(.modal.open) .back-to-top,body:has(dialog[open]) .back-to-top,body:has(#uaDeckModal:not(.hidden)) .back-to-top{display:none}@media(max-width:600px){.quick-tools{padding:6px;gap:3px}.quick-tools a{padding:7px 4px;font-size:12px}.deck-modal-head h2{font-size:24px}.deck-shell .deck-modal-head img{max-height:96px;width:66px}.event-summary{gap:12px}.quality-details>summary{padding:11px 13px}.section-head h2{font-size:clamp(25px,7vw,36px)}}
/* Keep narrow phone headers usable without clipping their controls. */
@media(max-width:430px){
 .home-header{grid-template-columns:minmax(0,1fr) auto;gap:6px;padding-inline:12px}
 .home-header .home-brand{min-width:0;width:auto;gap:6px}
 .home-header .home-brand img{width:28px;height:28px;flex:0 0 28px}
 .home-header .home-brand span{min-width:0}
 .home-header .home-brand b{font-size:21px;white-space:nowrap}
 .home-header .home-brand small{font-size:7px;letter-spacing:.08em}
 .home-header .home-tools{gap:6px;min-width:0}
 .home-header .home-tools select{width:108px;font-size:16px;letter-spacing:normal;padding-inline:6px}
 .home-header .home-tools button{min-width:44px;min-height:44px;padding:8px}
 header>.wrap.nav{width:calc(100% - 24px);gap:8px;min-width:0}
 header>.nav .brand{min-width:0;gap:6px;flex:1 1 0}
 header>.nav .brand-mark{width:28px;height:28px;flex:0 0 28px}
 header>.nav .brand-mark:after{width:26px}
 header>.nav .brand b{font-size:13px;letter-spacing:.04em;white-space:nowrap}
 header>.nav .nav-actions{flex:0 0 auto;gap:6px;min-width:0}
 header>.nav .nav-actions select{width:108px;padding-inline:8px;font-size:16px}
 header>.nav .menu-btn{min-width:44px;min-height:44px;padding:8px}
}
@media(max-width:360px){.home-header .home-brand small{display:none}header>.nav .nav-actions .auto-update-toggle{display:none}}
@media(max-width:760px){
 .activity-section .activity-fields input,.activity-section .activity-fields select,.ua-local-library>input{font-size:16px}
 .modal-card{max-height:90dvh}
 .source-modal-card{max-height:88dvh}
 .deck-modal-card{max-height:92dvh}
 .modal.open .close,.modal.open .modal-close{position:fixed;top:max(8px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));width:44px;height:44px;min-width:44px;min-height:44px;margin:0;float:none;z-index:150}
 .site-header #menuBtn{min-height:44px}
}
.source-card{min-width:0;overflow-wrap:anywhere}
/* Keep close controls reachable when phones or short windows scroll dialogs. */
@media(max-height:500px){
 .modal.open .close,.modal.open .modal-close{position:fixed;top:max(8px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));width:44px;height:44px;min-width:44px;min-height:44px;margin:0;float:none;z-index:150}
}
