/* Project cards keep dragging reserved for gallery navigation. */
#projects .pg-card,#projects .pg-card *{-webkit-user-select:none;user-select:none}
/* Selection is disabled throughout this portfolio, including lazy viewer content. */
html,html *,html *::before,html *::after{-webkit-user-select:none!important;user-select:none!important}
::selection{background:transparent;color:inherit}
/* The solid return circle follows the viewer's dark neutral controls. */
#experience-viewer .experience-return{display:grid;place-items:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;gap:0;border:0;border-radius:50%;background:#191919;color:#ededed;transition:background-color .2s,color .2s}
#experience-viewer .experience-return:hover{background:#292929;color:#fff}
#experience-viewer .experience-return span{width:18px;height:18px}
/* Match the tallest card in the desktop row; stacked layouts retain natural height. */
@media(min-width:768px) and (orientation:landscape){#projects .pg-viewport{align-items:stretch}}
/* Keyboard states are independent of hover and remain visible on dark surfaces. */
body :is(a[href],button:enabled,input,select,textarea,[tabindex]:not([tabindex="-1"])):focus-visible{outline:2px solid #ededed;outline-offset:4px}
#works .wg-filter:focus-visible{outline-offset:-4px;outline-color:#ededed;box-shadow:0 0 0 2px #050505}
#works .wg-filter[aria-pressed=true]:focus-visible{outline-color:#151515;box-shadow:0 0 0 2px #ededed}
.contact-effort:has(.effort-input:focus-visible) .effort-stage{outline:2px solid #ededed;outline-offset:4px}
.quiet-motion-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 13px;border:1px solid #ffffff38;border-radius:999px;background:#161616d9;color:#dedede;font:400 12px/1.4 Kanit,'Microsoft YaHei',sans-serif;white-space:nowrap;cursor:pointer;transition:background-color 150ms,color 150ms}
.quiet-motion-toggle:hover{background:#292929;color:#fff}
.quiet-motion-toggle:disabled{cursor:default;opacity:.6}
.quiet-motion-toggle svg{display:block;width:15px;height:15px;flex:none;fill:currentColor}
.quiet-motion-toggle .motion-play{display:none}
.quiet-motion-toggle[data-paused=true] .motion-play{display:block}
.quiet-motion-toggle[data-paused=true] .motion-pause{display:none}
.pg-controls{gap:10px;flex-wrap:wrap}
.pg-contribution{margin:18px 0 0;color:#bcbcbc;font-size:14px;line-height:1.75}
.pg-contribution-label{display:block;margin-bottom:4px;color:#ededed;font-size:11px;font-weight:500;letter-spacing:.08em}
/* The lifted category stage must not intercept the toolbar's lower hit cells. */
#works .works-toolbar{position:relative;z-index:1}
#works .works-gallery{isolation:isolate}
@media(min-width:901px){#works .wg-space[data-view=ring]{--wg-scene-height:min(clamp(620px,56vw,900px),max(280px,calc(100dvh - 184px)))}}
@media(max-width:600px){.pg-contribution{font-size:13px;margin-top:16px}.quiet-motion-toggle{padding-inline:11px}}
@media(prefers-reduced-motion:reduce){.quiet-motion-toggle{transition:none}}

/* Desktop keeps its existing hover and keyboard pause behavior. */
@media(hover:hover) and (pointer:fine){.pg-autoplay{display:none}}
