/* TapHub mobile v5.3. Single layout owner; working data and functionality unchanged. */
:root{--taphub-page-max:500px}
#app .page .th-horizontal,#app .page .detail-gallery{box-sizing:border-box!important;min-width:0!important;max-width:100%!important}
#app .page .admin-actions,#app .page .detail-tools,#app .page .form-buttons{min-width:0!important;flex-wrap:wrap!important}
#app .page .admin-actions>*,#app .page .detail-tools>*,#app .page .form-buttons>*{max-width:100%!important;min-width:0!important;white-space:normal!important;overflow-wrap:break-word!important}
#app .app-header,#app .header-inner,#app .page{box-sizing:border-box!important;min-width:0!important}
/* Final mobile grid, based on the approved v5 layout. The app shell alone owns width. */
html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}
#app.phone-shell{max-width:500px!important;width:100%!important;min-width:0!important;position:relative!important;left:auto!important;right:auto!important;overflow:clip!important;box-sizing:border-box!important;padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
#app>.app-header{position:sticky!important;top:0!important;left:auto!important;right:auto!important;transform:none!important;padding:0!important;height:58px!important;max-width:100%!important;width:100%!important}
#app>.app-header .header-inner{width:100%!important;max-width:100%!important;margin:0!important;padding:0 12px!important;min-height:0!important;height:100%!important}
#app>main.page{min-width:0!important;width:100%!important;max-width:100%!important;margin:0!important;padding-bottom:22px!important}
#app>.bottom-nav{position:fixed!important;bottom:0!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(100%,500px)!important;max-width:500px!important;height:calc(60px + env(safe-area-inset-bottom))!important;padding:3px 4px calc(3px + env(safe-area-inset-bottom))!important;gap:2px!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;border-radius:0!important}
#app>.bottom-nav>.nav-link{min-width:0!important;width:100%!important;max-width:100%!important;height:100%!important;padding:5px 1px!important;gap:4px!important;justify-content:center!important}
#app>.bottom-nav .nav-label{font-size:9px!important;line-height:1.2!important;white-space:normal!important;text-align:center!important}
#app>.bottom-nav .nav-symbol{width:22px!important;height:22px!important}#app>.bottom-nav .nav-symbol svg{width:20px!important;height:20px!important}
#app>main.page-home{padding:0 12px 20px!important;display:block!important;box-sizing:border-box!important}
#app .page-home>section:not([hidden]),#app .page-home>div:not(.th26-hero-dots){min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
#app .page-home .show-section{margin:16px 0 0!important;padding:0!important;width:100%!important}
#app .page-home .section-head{display:flex!important;justify-content:space-between!important;align-items:center!important;width:100%!important;max-width:100%!important;gap:8px!important;margin:0 0 8px!important;padding:0!important}
#app .page-home .section-head h2{margin:0!important;line-height:1.3!important;font-size:16px!important;letter-spacing:-.3px!important}
#app .page-home .section-head .inline-link{padding:4px 0!important;min-height:32px!important;white-space:nowrap!important;font-size:11px!important;min-width:0!important}
#app .page-home>.showcase,#app .page-home>.th26-hero{width:100%!important;max-width:100%!important;min-width:0!important;margin:10px 0 0!important;height:clamp(190px,49vw,235px)!important;min-height:0!important;max-height:235px!important;border-radius:16px!important}
#app .page-home .showcase-content,#app .page-home .th26-hero-copy{left:14px!important;right:14px!important;bottom:14px!important;max-width:100%!important;width:auto!important}
#app .page-home .showcase h1,#app .page-home .th26-hero-copy h1{font-size:clamp(22px,6.2vw,28px)!important;line-height:1.07!important;margin:0 0 7px!important;overflow-wrap:break-word!important;max-width:100%!important}
#app .page-home .showcase p,#app .page-home .th26-hero-copy p{font-size:11px!important;line-height:1.4!important;max-width:min(100%,250px)!important;margin:0 0 9px!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important}
#app .page-home .showcase .neon-button,#app .page-home .th26-hero-copy .neon-button{min-height:37px!important;height:auto!important;width:auto!important;max-width:100%!important;padding:8px 12px!important;font-size:11px!important;border-radius:10px!important}
#app .page-home .th26-hero-dots{width:100%!important;max-width:100%!important;margin:5px 0 0!important;justify-content:center!important;padding:0!important}
/* Categories wrap, never cut at the page edge. */
#app .page-home .th-v53-categories>.genre-strip{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important;margin:0!important;padding:0!important;width:100%!important;max-width:100%!important;overflow:visible!important}
#app .page-home .th-v53-categories .genre-chip{display:inline-flex!important;flex:0 1 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;min-height:36px!important;height:auto!important;padding:7px 9px!important;gap:4px!important;white-space:normal!important;font-size:11px!important;line-height:1.2!important}
#app .page-home .th-v53-categories .genre-chip span{min-width:0!important;white-space:normal!important;overflow-wrap:normal!important}
/* Approved v5 featured game: image and separate metadata, no extra giant cover. */
#app .page-home .th-v53-feature{display:block!important;box-sizing:border-box!important;position:relative!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:0!important;min-height:0!important;height:auto!important;background:#1b1429!important;color:#f7effc!important;border:1px solid #70438c!important;border-radius:14px!important;overflow:hidden!important;text-align:left!important;box-shadow:0 5px 18px #08041050!important;transform:none!important}
#app .page-home .th-v53-feature-art{display:block;position:relative;overflow:hidden;height:clamp(104px,29vw,142px);min-height:0;width:100%;background:#20162d}
#app .page-home .th-v53-feature-art>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;max-height:none;min-height:0}
#app .page-home .th-v53-feature-genre{position:absolute;left:8px;top:8px;padding:4px 7px;border:1px solid #e6bcff66;border-radius:7px;background:#161021d9;color:#e9c9ff;font-size:10px;line-height:1.1}
#app .page-home .th-v53-feature-art>.corner-pill{position:absolute;left:auto!important;right:8px!important;top:8px!important}
#app .page-home .th-v53-feature-info{display:flex;align-items:center;gap:8px;padding:9px 11px;min-width:0;min-height:48px;background:linear-gradient(120deg,#261a35,#181323)}
#app .page-home .th-v53-feature-text{display:flex;flex-direction:column;flex:1 1 0;min-width:0;gap:3px}
#app .page-home .th-v53-feature-text>strong{font-size:14px;font-weight:800;line-height:1.25;overflow-wrap:break-word}
#app .page-home .th-v53-feature-text>small{font-size:10px;color:#bba8c8;line-height:1.2}
#app .page-home .th-v53-feature-arrow{flex:0 0 30px;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:#643287;border:1px solid #b97cdb;color:#fff}
#app .page-home .th-v53-feature-arrow svg{width:16px;height:16px}
/* Three complete cards visible. Further cards remain available inside the horizontal strip. */
#app .page-home .game-grid.home-grid{display:flex!important;flex-flow:row nowrap!important;gap:8px!important;padding:0 0 4px!important;margin:0!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;scroll-snap-type:x mandatory!important;scroll-padding:0!important}
#app .page-home .game-grid.home-grid>.game-card{flex:0 0 calc((100% - 16px)/3)!important;width:calc((100% - 16px)/3)!important;min-width:0!important;max-width:calc((100% - 16px)/3)!important;height:auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;margin:0!important;border-radius:10px!important;scroll-snap-align:start!important;box-shadow:none!important}
#app .page-home .home-grid .game-cover{width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:1/1!important;overflow:hidden!important;flex:none!important}
#app .page-home .home-grid .game-cover img{width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;display:block!important}
#app .page-home .home-grid .game-card-body{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;justify-content:flex-start!important;gap:4px!important;min-height:0!important;height:auto!important;padding:6px!important}
#app .page-home .home-grid .game-card-title{font-size:11px!important;line-height:1.2!important;min-height:27px!important;max-height:27px!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;overflow-wrap:break-word!important;word-break:normal!important}
#app .page-home .home-grid .game-stat{height:auto!important;min-height:13px!important;max-width:100%!important;gap:3px!important;flex-wrap:nowrap!important;font-size:10px!important;line-height:1.15!important;margin:0!important;padding:0!important;overflow:hidden!important}
#app .page-home .home-grid .game-genre{width:auto!important;max-width:100%!important;min-height:0!important;margin:0!important;padding:3px 4px!important;gap:3px!important;line-height:1.1!important;font-size:9px!important;align-self:flex-start!important}
#app .page-home .home-grid .game-genre span{white-space:nowrap!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important}
#app .page-home .home-grid .game-genre svg{width:11px!important;height:11px!important;flex:none!important}
/* Story ring is a physical square; label and admin badge cannot resize it. */
#app .page-home #th-story-home.th-story-strip{background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;padding:0!important;margin:15px 0 0!important;max-width:100%!important;width:100%!important}
#app .page-home #th-story-home[hidden]{display:none!important}
#app .page-home #th-story-home>h2{font-size:16px!important;line-height:1.2!important;font-weight:800!important;letter-spacing:-.2px!important;margin:0 0 8px!important;padding:0!important;text-align:left!important}
#app .page-home #th-story-home .th-story-row{--story-slot:68px;--story-d:60px;display:flex!important;flex-flow:row nowrap!important;align-items:flex-start!important;justify-content:flex-start!important;gap:8px!important;width:100%!important;max-width:100%!important;margin:0!important;padding:4px 3px 5px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;scroll-snap-type:x proximity!important}
#app .page-home #th-story-home .th-story-row>.th-story-circle{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;flex:0 0 var(--story-slot)!important;width:var(--story-slot)!important;min-width:var(--story-slot)!important;max-width:var(--story-slot)!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;gap:5px!important;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;transform:none!important;overflow:visible!important}
#app .page-home #th-story-home .th-v53-story-visual{display:block!important;position:relative!important;width:var(--story-d)!important;height:var(--story-d)!important;flex:0 0 var(--story-d)!important;min-width:var(--story-d)!important;max-width:var(--story-d)!important;min-height:var(--story-d)!important;max-height:var(--story-d)!important;aspect-ratio:1/1!important}
#app .page-home #th-story-home .th-story-ring{display:block!important;position:relative!important;box-sizing:border-box!important;flex:none!important;width:100%!important;height:100%!important;min-width:0!important;max-width:100%!important;min-height:0!important;max-height:100%!important;aspect-ratio:1/1!important;border-radius:50%!important;border:0!important;background:linear-gradient(135deg,#efd0ff,#a34ce7)!important;padding:2px!important;margin:0!important;overflow:hidden!important;box-shadow:0 0 6px #b96bf855!important;transform:none!important}
#app .page-home #th-story-home .th-story-ring>img{box-sizing:border-box!important;display:block!important;width:100%!important;height:100%!important;min-width:0!important;max-width:none!important;min-height:0!important;max-height:none!important;aspect-ratio:1/1!important;object-fit:cover!important;object-position:center!important;border:2px solid #100d1b!important;border-radius:50%!important;margin:0!important;padding:0!important;transform:none!important;filter:none!important;box-shadow:none!important}
#app .page-home #th-story-home .th-seen .th-story-ring{background:#7d7a89!important;box-shadow:none!important}
#app .page-home #th-story-home .th-story-label{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis!important;overflow-wrap:break-word!important;word-break:normal!important;text-align:center!important;line-height:1.25!important;font-size:11px!important;min-height:28px!important;max-height:28px!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;color:#d9cbe5!important}
#app .page-home #th-story-home .th-v53-story-news-mark{position:absolute!important;right:-1px!important;bottom:-1px!important;width:20px!important;height:20px!important;display:grid!important;place-items:center!important;background:#1d162d!important;border:1px solid #cd9bff!important;border-radius:50%!important;color:#e1bfff!important}
#app .page-home #th-story-home .th-v53-story-news-mark svg{width:12px!important;height:12px!important}
/* New community panel in the approved v5 style, compact and fully clickable. */
#app .page-home .th-v53-community{display:flex!important;align-items:center!important;gap:9px!important;padding:11px!important;border-radius:13px!important;border:1px solid #684385!important;background:linear-gradient(130deg,#2d1c43,#171323)!important}
#app .page-home .th-v53-community-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;background:#4d2b65;border-radius:10px;color:#e0b8fb}
#app .page-home .th-v53-community-icon svg{width:19px;height:19px}
#app .page-home .th-v53-community>div{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
#app .page-home .th-v53-community strong{font-size:12px;line-height:1.3}
#app .page-home .th-v53-community small{font-size:10px;line-height:1.35;color:#c1accf}
#app .page-home .th-v53-community button{flex:0 0 30px;width:30px;min-width:0!important;min-height:36px!important;padding:0!important}
#app .page-home .th30-social-links{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;padding:0!important;margin:0!important;width:100%!important}
#app .page-home .th30-social-links>button{min-width:0!important;width:100%!important;white-space:normal!important;min-height:40px!important;height:auto!important;padding:7px 6px!important;font-size:11px!important}
#app .page-home .feature-ribbon{min-height:0!important;height:clamp(92px,25vw,126px)!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important}
#app .page-home .feature-ribbon img{width:100%!important;height:100%!important;object-fit:cover!important}
#app .page-home .news-grid{grid-template-columns:minmax(0,1fr)!important;gap:8px!important;width:100%!important;margin:0!important;padding:0!important}
#app .page-home .news-grid>.news-row{display:grid!important;grid-template-columns:86px minmax(0,1fr)!important;gap:0!important;min-height:0!important;width:100%!important;max-width:100%!important;margin:0!important;overflow:hidden!important}
#app .page-home .news-row .news-art,#app .page-home .news-row .news-image{width:100%!important;height:100%!important;min-height:84px!important;max-height:110px!important;object-fit:cover!important}
#app .page-home .news-row .news-text{padding:8px!important;min-width:0!important;gap:4px!important}
#app .page-home .news-row .news-title{font-size:12px!important;line-height:1.25!important;margin:0!important}
#app .page-home .news-row .news-text>p{font-size:10px!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;margin:0!important}
#app .page-home .news-row .news-date{font-size:9px!important;margin:0!important}
/* Avoid margin+100% overflow in all inner sections while retaining existing functionality. */
#app .page:not(.page-home) .page-pad,#app .page:not(.page-home) .profile-screen,#app .page:not(.page-home) .catalog-container{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;margin-inline:0!important;padding-inline:12px!important}
#app .page:not(.page-home) .page-pad>.form-card,#app .page:not(.page-home) .page-pad>.th22-card,#app .page:not(.page-home) .page-pad>.admin-card,#app .page:not(.page-home) .page-pad>.screen-heading{width:100%!important;max-width:100%!important;min-width:0!important;margin-inline:0!important}
#app .page:not(.page-home) .screen-heading{max-width:calc(100% - 24px)!important;width:auto!important;margin:10px 12px!important}
#app .page:not(.page-home) .page-pad .screen-heading{max-width:100%!important;width:100%!important;margin-inline:0!important}
#app .page-profile .profile-content,#app .page-profile .profile-card{max-width:100%!important;min-width:0!important;margin-inline:0!important;padding-inline:10px!important}
#app .page-profile .profile-content{width:100%!important;padding-inline:0!important}
#app .page-profile .th36-grid{min-width:0!important;max-width:100%!important;grid-template-columns:minmax(0,1fr)!important}
#app .page-profile .th36-tile{min-width:0!important;max-width:100%!important;min-height:44px!important}
#app .page-games .catalog-control,#app .page-games .catalog-toolbar,#app .page-games .catalog-feature-grid,#app .page-games .catalog-grid{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
#app .page-games .catalog-feature-grid,#app .page-games .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
#app .page-games .catalog-grid>.game-card,#app .page-games .catalog-feature-grid>.th-feature-game{width:100%!important;max-width:100%!important;min-width:0!important}
#app .page-games .catalog-control{width:100%!important;margin-inline:0!important;padding-inline:12px!important}
#app .page-games .catalog-toolbar{margin-inline:0!important;padding-inline:0!important;width:100%!important}
#app .page-news .th-v5-news-grid{width:auto!important;max-width:calc(100% - 24px)!important;margin:0 12px!important;min-width:0!important}
#app .page-news .th-v5-news-grid>.news-row{display:flex!important;grid-template-columns:none!important;min-width:0!important;width:100%!important;max-width:100%!important;min-height:0!important;padding:8px!important;gap:8px!important;margin:0!important}
#app .page-news .th-v5-news-grid>.news-row .news-art{min-width:84px!important;width:84px!important;flex:0 0 84px!important;height:80px!important;min-height:80px!important;max-height:80px!important;border-radius:8px!important}
#app .page-news .th-v5-news-grid>.news-row .news-image{width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;object-fit:cover!important}
#app .page-news .th-v5-news-grid>.news-row .news-text{position:static!important;flex:1!important;min-width:0!important;width:auto!important;background:none!important;padding:0!important;inset:auto!important}
#app .page-news .th-v5-news-grid>.news-row:first-child{display:block!important;padding:0!important;min-height:0!important}
#app .page-news .th-v5-news-grid>.news-row:first-child .news-art{width:100%!important;min-width:0!important;max-height:none!important;height:clamp(115px,35vw,168px)!important;min-height:0!important;border-radius:0!important}
#app .page-news .th-v5-news-grid>.news-row:first-child .news-text{padding:11px!important}
#app .page-news .th-v5-news-grid>.news-row:first-child .news-title{font-size:15px!important}
#app .page .tabs{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;margin-inline:0!important}
#app .page .tab{flex-shrink:0!important}
#app .page .text-input,#app .page .textarea,#app .page .dropdown,#app .page input:not([type=checkbox]):not([type=radio]),#app .page select,#app .page textarea{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
#app .page .th27-admin-grid,#app .page .admin-badges{grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:100%!important;min-width:0!important}
#app .page .admin-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:100%!important}
#app .page .th27-admin-tile,#app .page .admin-actions>*{min-width:0!important;max-width:100%!important}
#app .page .th27-admin-tile-copy{min-width:0!important;overflow-wrap:break-word!important}
#app .page .detail-hero,#app .page .detail-panel{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
#app .page .detail-gallery{max-width:100%!important;min-width:0!important;overflow-x:auto!important}
/* Overlay viewer stays on-screen and all controls remain over the media. */
#modal-layer:has(.th-story-viewer){box-sizing:border-box!important;padding:8px!important;overflow:auto!important}
#modal-layer:has(.th-story-viewer)>.modal{box-sizing:border-box!important;width:min(100%,500px)!important;max-width:500px!important;min-width:0!important;padding:0!important;margin:auto!important;overflow:hidden!important;border-radius:14px!important;background:#0c0915!important;border:1px solid #553b72!important}
#modal-layer:has(.th-story-viewer)>.modal>div:first-child:not(.th-story-viewer){display:none!important}
#modal-layer .th-story-viewer{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;height:min(76dvh,700px)!important;position:relative!important;overflow:hidden!important;border-radius:13px!important;background:#080710!important;margin:0!important}
#modal-layer .th-story-viewer>img,#modal-layer .th-story-viewer>video{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;object-fit:contain!important;border-radius:0!important;margin:0!important}
#modal-layer .th-story-viewer .th-viewer-button{min-width:0!important;min-height:36px!important;max-width:100%!important;position:absolute!important;z-index:4!important}
#modal-layer .th-story-viewer .th-viewer-back{left:8px!important;top:50%!important;transform:translateY(-50%)}
#modal-layer .th-story-viewer .th-viewer-next{right:8px!important;top:50%!important;transform:translateY(-50%)}
#modal-layer .th-story-viewer .th-viewer-close{top:12px!important;right:9px!important}
#modal-layer .th-story-viewer .th-viewer-like{bottom:11px!important;right:11px!important}
#modal-layer .th-story-viewer .th-viewer-count{bottom:14px!important;left:12px!important}
@media(max-width:359px){#app>main.page-home{padding-inline:10px!important}#app .page-home #th-story-home .th-story-row{--story-slot:64px;--story-d:57px;gap:7px!important}#app .page-home .th-v53-categories .genre-chip{padding:6px 7px!important;font-size:10.5px!important}#app .page-home .home-grid .game-card-title{font-size:10.5px!important}}
@media(max-width:500px){body{padding:0!important;margin:0!important}#app.phone-shell{border:0!important;border-radius:0!important;box-shadow:none!important}}

/* Wordmark and banner match the approved v5 concept; use an existing real project cover. */
#app .app-header .brand-big{font-style:normal!important;font-size:24px!important;font-weight:900!important;letter-spacing:-1px!important;line-height:1.1!important}
#app .page-home .showcase-art{position:absolute!important;inset:0!important;background-position:center!important;filter:none!important;overflow:hidden!important}
#app .page-home .showcase-art>.th-v53-showcase-image{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important;object-position:center!important}
#app .page-home .showcase-art:after{background:linear-gradient(90deg,#100b21ed 0%,#1c0d32d9 44%,#2f144052 100%),linear-gradient(0deg,#1c0d32a8,transparent)!important}
#app .page-home .showcase-content{z-index:2!important}
#app .page-home .showcase .neon-button,#app .page-home .th26-hero-copy .neon-button{color:#fff!important;background:linear-gradient(125deg,#7831b7,#a54ed5)!important;border:1px solid #c78bf2!important}
#app .page-home .showcase .neon-button svg,#app .page-home .th26-hero-copy .neon-button svg{stroke:currentColor!important}
