/* TD Tech R6. Scoped to public pages; original sizes and media stay intact. */
:root body:is(.home-page,.game-detail){--td-surface:#fff;--td-panel:#f0f6ff;--td-line:#cbdcf5;--td-text:#17263e;--td-sub:#576984;--td-accent:#246fd3;--td-glow:#409cf126;--bg:#f4f8ff;--paper:var(--td-surface);--ink:var(--td-text);--muted:var(--td-sub);--line:var(--td-line);background:#f4f8ff;color:var(--td-text)}
:root[data-theme=dark] body:is(.home-page,.game-detail){--td-surface:#101e31;--td-panel:#0b1627;--td-line:#294260;--td-text:#edf5ff;--td-sub:#a7b8d1;--td-accent:#78bcff;--td-glow:#34a9ff20;--bg:#07111f;--paper:var(--td-surface);--ink:var(--td-text);--muted:var(--td-sub);--line:var(--td-line);background:#07111f;color:var(--td-text)}
:root body.home-page .profile-hero{background:radial-gradient(ellipse at 50% 0,#3b9cfa16,transparent 68%),var(--bg)}
:root body.home-page .content-shell,:root body.home-page .muted-shell{background:var(--td-panel)}
:root body.home-page .plain-section{background:var(--bg)}
:root body.home-page :is(.mod-card,.link-card,.guide-video-card),:root body.game-detail :is(.detail-card){background:var(--td-surface);border-color:var(--td-line);box-shadow:0 8px 22px #102d5810}
:root body.home-page :is(.mod-copy p,.link-card small,.video-card small,.key-live-time){color:var(--td-sub)}
:root body.home-page :is(.profile-intro,.profile-tagline){color:var(--td-sub)}
:root body.home-page .profile-handle{color:var(--td-accent);background:var(--td-panel);border-color:var(--td-line)}
:root body.home-page .section-label{position:relative;isolation:isolate;color:var(--td-accent);background:var(--td-surface);border-color:var(--td-line);box-shadow:0 0 0 4px var(--td-glow);letter-spacing:1.7px}
:root body.home-page .hero-shop-card{position:relative;isolation:isolate;background:linear-gradient(115deg,var(--td-surface),var(--td-panel));border-color:var(--td-line);box-shadow:0 6px 20px #16386b10}
:root body.home-page .hero-shop-copy strong{color:var(--td-text)}
:root body.home-page .hero-shop-copy small{color:var(--td-sub)}
:root body.home-page .hero-shop-arrow{color:var(--td-accent)}
:root body.home-page .hero-shop-icon{background:linear-gradient(145deg,#226fdb,#20a6c5);box-shadow:0 5px 16px var(--td-glow)}
:root body.home-page .hero-shop-card-alt .hero-shop-icon{background:linear-gradient(145deg,#6b56d6,#447ff0)}
:root body.home-page :is(.modfile-card){border-color:var(--modfile-color,var(--td-line))}
:root body.home-page :is(.open-icon,.modfile-open){background:var(--td-panel);border-color:var(--td-line);color:var(--td-accent)}
:root body:is(.home-page,.game-detail) :is(.preview-pill,.modfile-preview){color:#246da7;background:#edf8ff;border-color:#91c9ee}
:root[data-theme=dark] body:is(.home-page,.game-detail) :is(.preview-pill,.modfile-preview){color:#b8e4ff;background:#16344c;border-color:#376a8c}
:root body.home-page .cloud-button{background:linear-gradient(145deg,#1761c4,#159abd);box-shadow:0 5px 15px #147ed92b}
:root body.home-page .cloud-button.android{background:linear-gradient(145deg,#0c8648,#19ad70);box-shadow:0 5px 15px #149d5430}
:root body.home-page .square-icon.key-download{background:linear-gradient(145deg,#1761c4,#159abd)}
:root body.home-page .square-icon.key-download.green{background:linear-gradient(145deg,#0c8648,#19ad70)}
:root body.home-page .site-footer{background:var(--bg);color:var(--td-sub)}
:root body.game-detail :is(.detail-copy h1,.detail-app-card h1,.detail-card h2){color:var(--td-text)}
:root body.game-detail .downloads{color:var(--td-sub)}
:root body.game-detail .detail-banner>div{background:linear-gradient(180deg,transparent 40%,var(--bg) 100%)}
:root body.home-page .hero-social{background:var(--td-surface);color:var(--td-text);border-color:var(--td-line)}
/* Short interaction feedback; individual scale/translate preserve existing transforms. */
:root body:is(.home-page,.game-detail) :is(.preview-pill,.modfile-preview,.modfile-open,.open-icon,.cloud-button,.hero-social,.hero-shop-card,.custom-action-button,.hamburger,.drawer-parent,.drawer-direct-link,.site-notice-link,.site-notice-snooze,.site-notice-dismiss,.download-choice-option){transition:scale .15s ease,opacity .15s ease,border-color .18s ease}
:root body:is(.home-page,.game-detail) :is(.preview-pill,.modfile-preview,.modfile-open,.open-icon,.cloud-button,.hero-social,.hero-shop-card,.custom-action-button,.hamburger,.drawer-parent,.drawer-direct-link,.site-notice-link,.site-notice-snooze,.site-notice-dismiss,.download-choice-option):active{scale:.965;opacity:.84}
:root body:is(.home-page,.game-detail) :is(a,button,summary):focus-visible{outline:2px solid var(--td-accent);outline-offset:4px}
:root body:is(.home-page,.game-detail) .drawer{transition:transform .22s cubic-bezier(.2,.8,.2,1)!important}
:root body:is(.home-page,.game-detail) :is(.gallery-modal.show .gallery-dialog,.warning-modal.show>div,.download-choice-modal.show .download-choice-dialog,.site-notice.is-show .site-notice-card){animation:td-tech-panel .22s cubic-bezier(.2,.8,.2,1)}
:root body:is(.home-page,.game-detail) .modfile-guide[open] .modfile-guide-body{animation:td-tech-panel .2s ease-out}
/* Detail photos and headings stay clear of sweeping overlays. */
:root body.game-detail .detail-app-card{background:transparent!important;background-image:none!important;box-shadow:none!important;border:0!important;isolation:auto}
:root body.game-detail .detail-icon{position:relative;z-index:1}
:root body.game-detail .detail-card{border-color:#71b1e1}
:root body.home-page :is(.mod-card,.key-card){border-color:#79b6d1;box-shadow:0 8px 22px #18395a12}
:root body.home-page .mod-card:has(.cloud-button.android),:root body.home-page .key-card:has(.square-icon.green){border-color:#69b897}
:root body.home-page .modfile-card{border-color:var(--modfile-color,#6f8fe8)}
.td-r6-motion-host{position:relative}
:root[data-td-motion=full] .td-r6-motion-host[data-td-r6-active=on] .td-r6-icon{animation:td-r6-icon 5.4s ease-in-out infinite;animation-delay:var(--td-r6-phase,0s)}
:root[data-td-motion=full] .td-idle-float[data-td-r6-active=on]{animation:td-idle-float 6.8s ease-in-out infinite;animation-delay:var(--td-r6-phase,0s)}
:root body.home-page .section-label::after{content:none;animation:none}
/* Home only: a translucent sweep stays clipped inside the existing card. */
body.home-page .td-home-scan-host{position:relative;--td-scan-color:#42b2ef}
body.home-page .td-home-scan-host:has(.cloud-button.android),body.home-page .td-home-scan-host:has(.square-icon.green){--td-scan-color:#29c88c}
body.home-page .td-home-sheen{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;z-index:1;margin:0!important;padding:0}
body.home-page .td-home-sheen::after{content:"";position:absolute;top:0;bottom:0;left:-50%;width:46%;background:linear-gradient(105deg,transparent,color-mix(in srgb,var(--td-scan-color) 15%,transparent),transparent);translate:0 0;opacity:0}
:root[data-td-motion=full] body.home-page .td-home-scan-host[data-td-home-scan=on]>.td-home-sheen::after{animation:td-home-scan 6.2s cubic-bezier(.4,0,.2,1) infinite;animation-delay:var(--td-scan-phase,0s)}
/* A narrow soft highlight sweeps across each button face, with a long rest. */
.td-button-flare{position:absolute;inset:0;pointer-events:none;z-index:1;border-radius:inherit;overflow:hidden;margin:0!important;padding:0!important;background:none!important}
.td-button-flare::after{content:"";position:absolute;inset:-20% auto -20% -65%;width:48%;background:linear-gradient(110deg,transparent 5%,#ffffff12 25%,#ffffff80 50%,#ffffff12 75%,transparent 95%);translate:0 0;opacity:0;pointer-events:none}
:root body.home-page :is(.hero-social,.preview-pill,.modfile-preview)>.td-button-flare::after{background:linear-gradient(110deg,transparent,#8dcfff45 50%,transparent)}
:root[data-td-motion=full] .td-r6-motion-host[data-td-r6-active=on]>.td-button-flare::after{animation:td-button-sweep 5.6s cubic-bezier(.4,0,.2,1) infinite;animation-delay:var(--td-r6-phase,0s)}
:root body.home-page :is(.cloud-button,.key-card .open-icon){border:1px solid #68c5ff;box-shadow:0 6px 18px #2589df38}
:root body.home-page .cloud-button.android{border-color:#87f5bd;box-shadow:0 6px 18px #17a96040}
:root body.home-page .key-card .open-icon{color:#fff;background:linear-gradient(145deg,#2875d4,#16a9c6)}
:root body.home-page .key-card:has(.square-icon.green) .open-icon{background:linear-gradient(145deg,#118c53,#23ba85);border-color:#87f5bd}
/* File Mod: a single circular launch button, without the small text label. */
:root body.home-page #file-mod .modfile-open.td-mod-open{width:54px;height:54px;max-width:100%;display:grid;place-items:center;border-radius:50%;border:1px solid #7cd9f1;background:linear-gradient(145deg,#2874d7,#13aec7);color:#fff;box-shadow:0 6px 17px #2589df35,inset 0 1px 0 #ffffff57;text-decoration:none}
:root body.home-page #file-mod .td-mod-open svg{width:25px!important;height:25px!important;fill:none!important;stroke:currentColor!important;stroke-width:2.6!important;stroke-linecap:round;stroke-linejoin:round}
/* Statistics always remain four columns in one horizontal row. */
:root body.home-page .profile-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:16px 6px;border:1px solid var(--td-line);border-radius:24px;background:var(--td-surface);box-shadow:0 8px 23px #18395a10;transform:none}
:root body.home-page .profile-stats>div.td-stat{--td-stat-color:#1975ca;position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:2px 5px;background:transparent;border:0;box-shadow:none;text-align:center}
:root body.home-page .profile-stats>.td-stat[data-td-stat="1"]{--td-stat-color:#128957}
:root body.home-page .profile-stats>.td-stat[data-td-stat="2"]{--td-stat-color:#b06a12}
:root body.home-page .profile-stats>.td-stat[data-td-stat="3"]{--td-stat-color:#7950c9}
:root body.home-page .profile-stats>.td-stat:not(:last-of-type)::after{content:"";position:absolute;right:0;top:15%;width:1px;height:70%;background:var(--td-line)}
:root body.home-page .profile-stats .td-stat-icon{display:grid;place-items:center;width:26px;height:28px;border-radius:8px;background:transparent;color:var(--td-stat-color);font-style:normal}
:root body.home-page .profile-stats .td-stat-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
:root body.home-page .profile-stats .td-stat strong{display:block;min-width:0;color:var(--td-stat-color);font-size:clamp(13px,4vw,19px);font-weight:900;line-height:1.2;letter-spacing:-.7px;white-space:nowrap;font-variant-numeric:tabular-nums}
:root body.home-page .profile-stats .td-stat>span{display:block;margin:0;color:var(--td-sub);font-size:clamp(9px,2.5vw,11px);font-weight:800;line-height:1.35;white-space:nowrap}
:root[data-theme=dark] body.home-page .profile-stats>.td-stat{--td-stat-color:#79bfff}
:root[data-theme=dark] body.home-page .profile-stats>.td-stat[data-td-stat="1"]{--td-stat-color:#6ed8a8}
:root[data-theme=dark] body.home-page .profile-stats>.td-stat[data-td-stat="2"]{--td-stat-color:#f5bd6f}
:root[data-theme=dark] body.home-page .profile-stats>.td-stat[data-td-stat="3"]{--td-stat-color:#c6a8ff}
/* Staggered scroll entry uses independent transforms, keeping content visible. */
:root body:is(.home-page,.game-detail) .td-r6-enter{animation:td-r6-enter .5s cubic-bezier(.16,1,.3,1) both;animation-delay:var(--td-enter-delay,0ms)}
:root body:is(.home-page,.game-detail) .td-r6-tapped{animation:td-r6-tap .3s ease-out!important}
@keyframes td-tech-panel{from{translate:0 10px;opacity:.6}to{translate:0 0;opacity:1}}


@keyframes td-home-scan{0%,15%{translate:0 0;opacity:0}23%{opacity:1}66%{translate:340% 0;opacity:0}100%{translate:340% 0;opacity:0}}

@keyframes td-r6-enter{from{translate:0 22px;scale:.976}to{translate:0 0;scale:1}}
@keyframes td-r6-tap{0%{scale:.93}55%{scale:1.025}100%{scale:1}}
:root[data-td-paused] .td-r6-icon,:root[data-td-paused] .td-button-flare::after,:root[data-td-paused] .td-home-sheen::after{animation-play-state:paused!important}
:root:not([data-td-motion=full]) .td-r6-enter,:root[data-td-motion=off] .td-r6-tapped{animation:none!important}
@media(max-width:360px){:root body.home-page #file-mod .modfile-open.td-mod-open{width:44px;height:44px}:root body.home-page #file-mod .td-mod-open svg{width:22px!important;height:22px!important}}
@media(prefers-reduced-motion:reduce){.td-r6-icon,.td-r6-enter,.td-r6-tapped,.td-button-flare::after,.td-home-sheen::after{animation:none!important}:root body:is(.home-page,.game-detail) :is(.gallery-dialog,.download-choice-dialog,.site-notice-card,.warning-modal>div,.modfile-guide-body){animation:none!important}}

/* Clean chrome: no added colored rings on every tile. */
:root body.home-page :is(.hero-social,.hero-shop-card){border:0!important;box-shadow:0 6px 19px #2446630c}
:root body.home-page .section-label{border:1px solid var(--td-line);box-shadow:none;background:var(--td-surface)}
:root body.home-page .profile-handle{border:0;box-shadow:none;background:var(--td-panel)}
:root body.home-page .profile-stats{border:1px solid var(--td-line);box-shadow:0 6px 20px #2446630b}
:root body.home-page .profile-stats .td-stat-icon{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0;padding:0}
:root body.home-page .profile-stats>div.td-stat:last-of-type::after{content:none!important;display:none!important;border:0!important}
:root body.home-page .profile-stats>.td-stat:not(:last-of-type)::after{height:48%;top:26%;opacity:.6}
/* Slow, small independent movement; no moving borders or color loops. */
@keyframes td-idle-float{0%,100%{translate:0 0}50%{translate:0 -3px}}
@keyframes td-r6-icon{0%,100%{translate:0 0;rotate:0deg}50%{translate:0 -2px;rotate:-3deg}}
@keyframes td-button-sweep{0%,12%{translate:0 0;opacity:0}20%{opacity:.8}48%{translate:350% 0;opacity:0}100%{translate:350% 0;opacity:0}}
:root[data-td-paused] .td-idle-float{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.td-idle-float{animation:none!important}}
