/* TapHub 6.4.6 — scoped dialogue and profile layout, 420px shell unchanged. */
#app .page-profile .th646-profile{padding:12px!important;display:block!important;background:none!important}
#app .page-profile .th646-profile .profile-card{padding:14px!important;margin:0 0 16px!important;background:#1b1c1e!important;border:1px solid #303234!important;border-radius:16px!important;box-shadow:none!important}
#app .page-profile .th646-profile .profile-top{margin:0!important;gap:12px!important;align-items:center!important}
#app .page-profile .th646-profile .profile-top>.avatar{width:76px!important;height:76px!important;min-width:76px!important;max-width:76px!important;flex:0 0 76px!important;border-radius:14px!important}
#app .page-profile .th646-profile .profile-name{font-size:20px!important;line-height:1.2!important;overflow-wrap:anywhere}
#app .page-profile .th646-profile .profile-tag{font-size:12px!important;margin:5px 0!important;line-height:1.35}
#app .page-profile .th646-profile .profile-hint{font-size:11px!important}
#app .page-profile .th646-profile .stats-strip{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;background:none!important;padding:0!important;margin:14px 0 10px!important;border:0!important;border-radius:0!important;overflow:visible!important}
#app .page-profile .th646-profile .stats-strip>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:46px;padding:3px 1px;background:transparent!important;color:#f7f7f7!important;border:0!important;border-radius:0!important;box-shadow:none!important;text-align:center}
#app .page-profile .th646-profile .stats-strip>button+button{border-left:1px solid #36383a!important}
#app .page-profile .th646-profile .stats-strip strong{font-size:20px!important;line-height:1.1}
#app .page-profile .th646-profile .stats-strip span{font-size:11px!important;line-height:1.2;overflow-wrap:anywhere;color:#b9b9bb!important}
#app .page-profile .th646-settings{border-top:1px solid #303234;padding-top:8px;margin-top:8px}
#app .page-profile .th646-settings>summary{display:flex;align-items:center;gap:8px;min-height:40px;cursor:pointer;list-style:none;font-size:13px;font-weight:700;color:#d9fa66}
#app .page-profile .th646-settings>summary::-webkit-details-marker{display:none}
#app .page-profile .th646-settings>summary .lucide{width:18px;height:18px}
#app .page-profile .th646-settings>summary span{margin-left:auto;font-size:20px}
#app .page-profile .th646-settings[open]>summary span{transform:rotate(180deg)}
#app .page-profile .th646-settings .th26-settings{margin:4px 0 0!important;padding:8px 0 0!important;border:0!important;background:transparent!important}
#app .page-profile .th646-profile .profile-content{display:block!important;padding:0!important;margin:0!important}
#app .page-profile .th646-profile .th36-menu{padding:0!important;margin:0 0 18px!important}
#app .page-profile .th646-profile .th36-menu-title{font-size:19px!important;margin:0 0 10px!important}
#app .page-profile .th646-profile .th36-group{border:0!important;background:none!important;box-shadow:none!important;padding:0!important;margin:0 0 10px!important;border-radius:0!important}
#app .page-profile .th646-profile .th36-group-title{font-size:12px!important;font-weight:700;margin:0 0 5px!important;color:#b9b9bb!important}
#app .page-profile .th646-profile .th36-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:0!important;background:none!important;border:0!important;border-radius:0!important;overflow:visible!important}
#app .page-profile .th646-profile .th36-tile{display:flex!important;align-items:center!important;gap:7px!important;min-height:44px!important;height:auto!important;padding:7px 9px!important;background:#1b1c1e!important;border:1px solid #303234!important;border-radius:10px!important;font-size:12px!important;line-height:1.2!important;box-shadow:none!important;color:#f7f7f7!important;white-space:normal!important}
#app .page-profile .th646-profile .th36-tile .lucide{width:17px!important;height:17px!important;min-width:17px!important;flex:0 0 17px!important;color:#d9fa66!important}
#app .page-profile .th646-profile .th36-tile:hover,#app .page-profile .th646-profile .th36-tile:focus-visible{border-color:#d9fa66!important;outline:none}
#app .page-profile .th646-profile .th36-tile .th36-count{position:static!important;flex:none!important;font-size:10px!important;min-width:16px!important;height:16px!important;padding:0 3px!important}
#app .page-profile .th646-profile .th646-profile-section{margin:0 0 18px!important}
#app .page-profile .th646-profile .th646-profile-section .section-head{margin:0 0 9px!important;gap:6px}
#app .page-profile .th646-profile .th646-profile-section .section-head h2{font-size:17px!important}
#app .page-profile .th646-profile .th646-game-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:start;min-width:0}
#app .page-profile .th646-game-grid>.th-no-favorites,#app .page-profile .th646-game-grid>.muted{grid-column:1/-1;min-height:0!important;padding:12px!important}
#app .page-profile .th646-game-tile{min-width:0;width:100%;display:flex;flex-direction:column;gap:5px;border:0;background:none;padding:0;text-align:left;color:#f7f7f7}
#app .page-profile .th646-game-tile img{width:100%;aspect-ratio:1;object-fit:cover;display:block;border-radius:11px;background:#242527}
#app .page-profile .th646-game-tile strong{font-size:12px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
#app .page-messages .th646-dialog-tools{display:flex;justify-content:flex-end;margin:0 0 8px}
#app .page-messages .th646-dialog-tools>button{min-height:40px;padding:8px 12px;font-size:13px!important;background:#242527!important;color:#d9fa66!important;border:1px solid #36383a!important;border-radius:10px!important}
#app .page-messages .th646-composer{margin:0 0 16px!important;padding:10px!important;border:1px solid #303234!important;background:#1b1c1e!important;box-shadow:none!important;border-radius:14px!important;gap:8px!important}
#app .page-messages .th646-composer textarea{min-height:70px!important;font-size:14px!important;background:#242527!important;border:1px solid #36383a!important;color:#f7f7f7!important}
#app .page-messages .th646-compose-actions{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;min-width:0}
#app .page-messages .th646-compose-actions .th23-attach{flex:1 1 150px;min-width:0;max-width:100%;padding:6px 0!important;border:0!important;background:none!important;font-size:12px!important;overflow:hidden}
#app .page-messages .th646-compose-actions input[type=file]{display:block;max-width:100%;width:100%;font-size:11px!important;margin-top:5px}
#app .page-messages .th646-compose-actions .primary-button{flex:0 0 auto;min-height:42px!important;font-size:13px!important;padding:9px 12px!important}
#app .page-messages .th646-chat-heading{font-size:17px!important;margin:0 0 8px!important}
#app .page-messages .th646-chat{padding:10px!important;gap:10px!important;min-height:0!important;border:0!important;background:none!important;box-shadow:none!important}
#app .page-messages .th646-chat .th23-bubble{max-width:82%;min-width:0;overflow-wrap:anywhere;background:#242527!important;border:1px solid #303234!important;box-shadow:none!important}
#app .page-messages .th646-chat .is-own .th23-bubble{background:#2e3330!important;border-color:#3b4633!important}
#app .page-messages .th646-chat .th23-msg-body{font-size:14px!important;line-height:1.45!important}
#app .page-messages .th646-chat .th23-date{font-size:11px!important}
#modal-layer:has(.th646-attachment-modal) .modal{width:min(100%,396px)!important;background:#1b1c1e!important;border:1px solid #36383a!important;max-height:85dvh!important;padding:14px!important}
.th646-attachment-modal{min-width:0;color:#f7f7f7}.th646-attachment-status{font-size:13px;color:#b9b9bb;margin:0 0 12px}.th646-attachment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.th646-attachment-grid>a{display:block;min-width:0;border-radius:9px;overflow:hidden;background:#242527}.th646-attachment-grid img{display:block;width:100%;aspect-ratio:1;object-fit:cover}.th646-attachment-modal>[data-th646-more]{margin:12px 0 0;width:100%;min-height:42px;color:#d9fa66;background:#242527;border-color:#36383a}.th646-attachment-modal>[hidden]{display:none!important}
@media(max-width:355px){#app .page-profile .th646-profile .th36-tile{padding:7px 6px!important;gap:5px!important;font-size:11px!important}#app .page-profile .th646-profile .profile-top>.avatar{width:64px!important;height:64px!important;min-width:64px!important;max-width:64px!important;flex-basis:64px!important}#app .page-profile .th646-profile .stats-strip span{font-size:10px!important}}
/* Community: independent profile and content links; restrained surfaces. */
#app .th646-user-link{display:inline-flex!important;align-items:center;min-width:0;max-width:100%;gap:3px;color:#d9fa66!important;text-decoration:none!important;font-size:inherit;line-height:1.35;font-weight:700;overflow-wrap:anywhere;cursor:pointer}
#app .th646-user-link:hover,#app .th646-user-link:focus-visible{text-decoration:underline!important;outline-offset:3px}
#app .th646-user-link .th-badged-name{min-width:0;white-space:normal;overflow-wrap:anywhere}
#app .page-forum .th22,#app .page-messages .th22,#app .page-notifications .th22{padding:12px!important}
#app .th646-list-caption{font-size:13px;color:#b9b9bb;margin:12px 0 8px;font-weight:600}
#app .page-forum .th23-forum-categories{display:flex!important;gap:6px!important;overflow-x:auto!important;padding:2px 0 8px!important;scrollbar-width:none}
#app .page-forum .th23-category{flex:0 0 auto;min-height:36px!important;padding:7px 11px!important;font-size:12px!important;border-radius:18px!important;color:#f7f7f7!important;background:#252628!important;border:0!important}
#app .page-forum .th23-category.active{background:#d9fa66!important;color:#111213!important}
#app .page-forum .th23-new-topic{background:#1b1c1e!important;border:1px solid #303234!important;border-radius:12px!important;padding:0 12px!important;margin:8px 0!important;box-shadow:none!important}
#app .page-forum .th23-new-topic>summary{padding:12px 0!important;color:#d9fa66!important;font-size:14px!important;cursor:pointer}
#app .th646-forum-list{display:grid!important;gap:9px!important}
#app .page-forum .th646-topic{display:block!important;padding:12px!important;margin:0!important;min-width:0!important;background:#1b1c1e!important;border:1px solid #303234!important;border-radius:13px!important;box-shadow:none!important;cursor:default!important}
#app .th646-topic-top,#app .th646-topic-footer,#app .th646-author-line{display:flex;align-items:center;gap:8px;min-width:0}
#app .th646-topic-top,#app .th646-topic-footer{justify-content:space-between}
#app .th646-topic .th23-category-label{font-size:11px!important;color:#d9fa66!important;background:#30352a!important;padding:4px 8px;border-radius:7px;white-space:nowrap}
#app .th646-reply-count{display:flex;align-items:center;gap:4px;color:#b9b9bb;font-size:12px}.th646-reply-count .lucide{width:14px;height:14px}
#app .th646-topic h3{margin:9px 0 5px!important;font-size:16px!important;line-height:1.3!important}
#app .th646-topic-title{color:#f7f7f7!important;text-decoration:none!important;display:block;overflow-wrap:anywhere}
#app .th646-topic-title:hover{color:#d9fa66!important}
#app .th646-topic p{font-size:13px!important;color:#b9b9bb!important;line-height:1.4!important;margin:0 0 10px!important;overflow-wrap:anywhere}
#app .th646-topic-footer{border-top:1px solid #303234;padding-top:9px;flex-wrap:wrap}
#app .th646-author-line{flex:1 1 130px;max-width:100%;font-size:12px}.th646-author-line .th23-avatar{width:26px!important;height:26px!important;flex:0 0 26px;object-fit:cover;border-radius:8px!important}
#app .th646-topic-footer small{font-size:11px!important;color:#a5a5a8;white-space:nowrap}
#app .th646-empty{padding:16px!important;background:#1b1c1e;border:1px solid #303234;border-radius:12px;color:#b9b9bb;font-size:13px;text-align:center}
#app .page-messages .th646-thread{display:flex!important;align-items:center;gap:10px!important;padding:12px!important;margin:0 0 8px!important;background:#1b1c1e!important;border:1px solid #303234!important;border-radius:12px!important;min-width:0;box-shadow:none!important}
#app .th646-thread-avatar{flex:0 0 42px;display:block}.th646-thread-avatar img{width:42px!important;height:42px!important;border-radius:10px!important;object-fit:cover}
#app .th646-thread-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}.th646-thread-copy strong{font-size:14px!important;overflow-wrap:anywhere}
#app .th646-thread-preview{display:block;color:#b9b9bb!important;font-size:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:none!important}
#app .th646-thread-open{flex:0 0 40px;min-height:40px;width:40px;display:grid;place-items:center;background:#262729!important;color:#d9fa66!important;border:0!important;border-radius:10px!important}.th646-thread-open .lucide{width:20px;height:20px}
#app .th646-chat .th28-bubble-author{display:block!important;font-size:12px!important;margin-bottom:5px!important}
#app .th646-notices{display:grid!important;gap:8px!important}
#app .page-notifications .th646-notice{display:block!important;padding:12px!important;min-width:0;background:#1b1c1e!important;border:1px solid #303234!important;box-shadow:none!important;border-radius:12px!important}
#app .page-notifications .th646-notice.unread{border-left:3px solid #d9fa66!important}
#app .th646-notice-top{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.th646-notice-top strong{flex:1;min-width:0;font-size:14px!important;overflow-wrap:anywhere}.th646-notice-top small{font-size:11px!important}.th646-notice-author{font-size:13px;margin:7px 0 0}.th646-notice p{font-size:13px!important;color:#b9b9bb!important;line-height:1.4;margin:7px 0;overflow-wrap:anywhere}
#app .th646-notice-open{display:inline-flex;align-items:center;gap:4px;color:#d9fa66!important;border:0;background:none!important;padding:5px 0;min-height:34px;font-size:12px;font-weight:700}.th646-notice-open .lucide{width:15px;height:15px}
#app .th646-people .th31-search{display:flex!important;gap:8px!important;min-width:0;margin:14px 0!important}#app .th646-people .th31-search input{flex:1;min-width:0!important;font-size:13px!important}#app .th646-people .th31-search button{flex:0 0 auto;font-size:13px!important;min-height:42px!important}
#app .th646-people .th31-person{padding:10px!important;border:1px solid #303234!important;background:#242527!important;border-radius:10px!important;min-height:60px!important;margin:0 0 6px!important;gap:10px!important}#app .th646-people .th31-person strong{font-size:14px!important;color:#d9fa66!important;overflow-wrap:anywhere}#app .th646-people .th31-person img{width:40px!important;height:40px!important;border-radius:9px!important;object-fit:cover}
#app .page-ideas .th13-idea-meta{display:flex!important;gap:8px!important;flex-wrap:wrap!important;font-size:12px!important}#app .page-ideas .th13-idea-card{padding:12px!important}#app .page-ideas .th13-idea-card h3{font-size:16px!important}#app .page-ideas .th13-idea-card p{font-size:14px!important;line-height:1.45!important;overflow-wrap:anywhere}

/* 6.4.7: settings are a separate card above the collection. */
#app .page-profile .th646-profile .th647-settings-card .th646-settings{border:0;padding:0;margin:0}
#app .page-profile .th646-profile .th647-settings-card .th646-settings>summary{min-height:32px}
#app .page-profile .th646-profile .th647-settings-card .th26-settings{padding-top:8px!important}
