/* TapHub v26.1: restore original responsive layout; keep v26 features. */
html,body{max-width:100%;overflow-x:hidden}
#app *,#app *::before,#app *::after{box-sizing:border-box}
#app .th23-forum-list,#app .th23-threads,#app .th23-chat,#app .th23-new-topic,#app .th24-comments{min-width:0;max-width:100%}
#app .th23-topic,#app .th23-thread,#app .th24-comment,#app .admin-card{min-width:0;overflow-wrap:anywhere}
#app .th23-chat .th23-bubble{max-width:82%}
#app .th23-chat-form{max-width:100%}
#app .th26-bell-dot{position:absolute;top:1px;right:0;min-width:13px;height:13px;padding:0 3px;border-radius:20px;background:#e94357;box-shadow:0 0 0 2px #131022;color:#fff;font-size:9px;font-weight:800;line-height:13px;text-align:center;pointer-events:none}
#app .header-icon[data-notice-bell]{position:relative;overflow:visible}
#app .th26-unread-number{display:inline-flex;align-items:center;justify-content:center;background:#e94357;color:white;min-width:20px;height:20px;padding:0 4px;border-radius:12px;font-size:11px}
#app .th26-author-level{font-size:10px;opacity:.7;font-weight:500}
#app .th26-notice-list{display:flex;flex-direction:column;gap:9px}
#app .th26-notice{display:flex;width:100%;align-items:center;gap:11px;text-align:left;border-radius:13px;border:1px solid #493e5b;background:#1c172a;color:#eee8fb;padding:12px 10px;cursor:pointer;min-width:0}
#app .th26-notice.unread{background:#2b1c36;border-color:#91618f}
#app .th26-notice>span:nth-child(2){min-width:0;display:flex;flex-direction:column;gap:5px;flex:1;overflow-wrap:anywhere}
#app .th26-notice small{font-size:12px;color:#bfb4d0;line-height:1.4}
#app .th26-notice-mark{color:#e94357;font-size:17px}
#app .th26-notice .lucide{width:15px;height:15px;flex-shrink:0}
#app .th26-settings{margin:16px 12px;padding:14px 12px;border-radius:16px;background:#201930;border:1px solid #453450}
#app .th26-settings h2{font-size:16px;margin:0 0 9px}
#app .th26-settings form,#app .th26-banner-admin{display:flex;flex-direction:column;gap:13px}
#app .th26-settings .field{width:100%;min-width:0}
#app .th26-settings input,#app .th26-settings select{max-width:100%}
#app .th26-level-track{width:100%;height:8px;border-radius:9px;background:#120f1c;overflow:hidden}
#app .th26-level-track>span{height:100%;display:block;background:linear-gradient(90deg,#9772ec,#f8cc78);border-radius:9px}
#app .th26-user-admin{display:flex;flex-direction:column;gap:12px}
#app .th26-user-row{display:flex;gap:10px;align-items:center;min-width:0;padding:12px 8px;background:#211a30;border:1px solid #453450;border-radius:14px;flex-wrap:wrap}
#app .th26-user-desc{flex:1;min-width:140px;display:flex;flex-direction:column;gap:4px;overflow-wrap:anywhere}
#app .th26-user-desc small{font-size:11px;color:#b6abc9}
#app .th26-block{border-radius:9px;border:1px solid #ef6876;background:#412334;color:#ffd4d9;padding:9px;font:inherit;font-size:12px;cursor:pointer}
#app .th26-block.is-blocked{border-color:#6a92c0;background:#212d49;color:#dae9ff}
#app .th26-block-text{color:#e89daa!important}
#app .th26-banner-admin .field{display:flex;flex-direction:column;gap:6px}
#app .th26-banner-admin .dropdown{width:100%;min-width:0}
#app .th26-hero{height:228px;position:relative;border-radius:16px;overflow:hidden;margin:8px 10px 0;border:1px solid #675174;background:#1b1425}
#app .th26-hero-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.85}
#app .th26-hero-shade{position:absolute;inset:0;background:linear-gradient(0deg,#100e1cf5 0%,#100e1ca6 50%,#100e1c25 100%)}
#app .th26-hero-copy{position:absolute;bottom:14px;left:15px;right:15px;color:#fff;display:flex;flex-direction:column;align-items:flex-start;gap:7px}
#app .th26-hero-copy h1{font-size:24px;line-height:1.05;margin:0;text-shadow:0 2px 5px #000}
#app .th26-hero-copy p{font-size:12px;line-height:1.4;max-height:33px;overflow:hidden;margin:0;color:#eae1f0}
#app .th26-hero-copy .neon-button{min-height:36px;max-width:100%;font-size:12px;padding:7px 12px}
#app .th26-hero-eyebrow{text-transform:uppercase;letter-spacing:.12em;font-weight:800;font-size:10px;color:#f0c879}
#app .th26-hero-dots{display:flex;gap:9px;align-items:center;justify-content:center;margin:8px 0 4px}
#app .th26-hero-dots button{width:9px;height:9px;border-radius:50%;background:#4c3c66;border:0;cursor:pointer}
#app .th26-hero-dots button.active{background:#edbf79;width:22px;border-radius:8px}
#app .tabs{max-width:100%;overflow-x:auto}
@media(max-width:350px){#app .th26-hero{height:205px;margin-inline:8px}#app .th26-hero-copy h1{font-size:21px}#app .th26-user-row{gap:6px}}

/* OLD RESPONSIVE SHELL RESTORED: no 450px global viewport clamp. */
#app.phone-shell{width:100%;max-width:1320px!important;min-width:0;margin:0 auto}
#app .app-header{position:sticky;left:auto;right:auto;transform:none;width:100%;max-width:none;box-sizing:border-box}
#app .header-inner{max-width:1232px;width:100%;min-width:0;margin-inline:auto}
#app .page,#app .screen-heading,#app .page-pad,#app .catalog-container,#app .show-section,#app .showcase,#app .th22,#app .profile-screen{max-width:none;min-width:0;box-sizing:border-box}
#app .th22{max-width:none}
/* On desktop, footer stays hidden exactly as before v26. */
@media(min-width:701px){
 #app .bottom-nav{display:none!important}
 #app .th26-hero{height:clamp(300px,36vw,495px);margin:20px 36px 0}
 #app .th26-hero-copy{left:clamp(22px,5vw,70px);right:clamp(22px,5vw,70px);bottom:clamp(22px,4vw,55px);max-width:550px}
 #app .th26-hero-copy h1{font-size:clamp(27px,3.3vw,48px)}
 #app .th26-hero-copy p{font-size:clamp(13px,1.15vw,17px);max-height:none}
}
@media(max-width:700px){
 #app.phone-shell{max-width:none!important;width:100%}
 #app .bottom-nav{display:flex!important;position:fixed;bottom:0!important;left:0!important;right:0!important;width:100%!important;max-width:none!important;transform:none!important;min-width:0;box-sizing:border-box}
 #app .th26-hero{margin:12px 12px 0;height:clamp(220px,64vw,320px)}
 #app .th26-hero-copy h1{font-size:clamp(23px,6vw,32px)}
}
/* ADMIN LAYOUT: stable and readable at both screen widths. */
#app .admin-badges{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0;align-items:stretch}
#app .admin-stat{min-width:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:10px;overflow-wrap:anywhere}
#app .admin-stat span{display:block;line-height:1.35;min-width:0}
#app .admin-stat strong{display:block;line-height:1.15;max-width:100%}
#app .admin-card{width:100%;min-width:0;max-width:100%;overflow-wrap:anywhere}
#app .admin-card-head{display:flex;align-items:center;gap:12px;min-width:0}
#app .admin-card-head img{flex:0 0 auto;object-fit:cover;max-width:68px}
#app .admin-card-head .list-text,#app .admin-card-head > div{min-width:0;flex:1;overflow-wrap:anywhere}
#app .admin-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0}
#app .admin-actions button{min-width:0!important;max-width:100%;width:100%;height:auto;min-height:37px;white-space:normal;overflow-wrap:anywhere;line-height:1.25;padding:9px 7px;display:flex;align-items:center;justify-content:center;gap:5px;text-align:center}
#app .admin-actions .lucide{flex-shrink:0}
#app .tabs{width:100%;min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:thin;flex-wrap:nowrap}
#app .tabs .tab{flex:none;white-space:nowrap}
#app .th26-user-admin,#app .th26-banner-admin{min-width:0;max-width:100%}
#app .th26-user-row{width:100%;min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px}
#app .th26-user-row .th26-user-desc{min-width:0;max-width:100%;overflow-wrap:anywhere}
#app .th26-user-row .th26-block{min-width:0;max-width:100%;white-space:normal}
#app .th26-banner-admin .dropdown{width:100%;min-width:0;max-width:100%}
@media(min-width:701px) and (max-width:1060px){
 #app .admin-badges{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
 #app .admin-badges{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 #app .admin-stat{padding:12px 10px;min-height:88px}
 #app .admin-stat strong{font-size:22px}
 #app .admin-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 #app .th26-user-row{grid-template-columns:auto minmax(0,1fr);gap:9px}
 #app .th26-user-row .th26-block{grid-column:1/-1;width:100%}
}
@media(max-width:360px){
 #app .admin-stat strong{font-size:20px}
 #app .admin-stat span{font-size:10px}
 #app .admin-actions button{font-size:11px;padding:8px 5px}
}
/* TapHub v26.2: desktop footer restored after v26.1 hide regression. */
@media (min-width: 701px) {
  #app .bottom-nav {
    display: flex !important;
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: 0 !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 1320px !important;
    min-width: 0 !important;
    height: 74px !important;
    padding: 6px 12px 7px !important;
    border-radius: 0 !important;
    border-top: 1px solid #27213b;
    background: rgba(11,11,24,.97) !important;
    box-shadow: 0 -7px 20px rgba(0,0,0,.2);
    backdrop-filter: blur(15px);
    z-index: 55;
    align-items: stretch;
    box-sizing: border-box;
  }
  #app .bottom-nav .nav-link {
    flex: 1 1 0;
    min-width: 0;
  }
  #app.phone-shell {
    padding-bottom: 88px !important;
  }
}
/* TapHub v26.3: one coherent 500px shell and bottom navigation on ALL screens.
   Loaded after v26.1 and optional v26.2; does not modify markup or app features. */
:root { --taphub-page-max: 500px; }
html, body { max-width: 100%; overflow-x: hidden; }
#app.phone-shell {
  width: 100% !important;
  max-width: 500px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
}
/* Sticky header remains in normal flow, aligned with the 500px shell. */
#app .app-header {
  position: sticky !important;
  top: 0 !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
#app .header-inner { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
#app .page, #app .screen-heading, #app .page-pad, #app .catalog-container,
#app .show-section, #app .showcase, #app .th22, #app .profile-screen {
  width: 100%; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box;
}
/* Keep the same footer on desktop and mobile despite previous media-specific rules. */
#app .bottom-nav {
  display: flex !important;
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 0 !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 500px !important;
  min-width: 0 !important;
  height: calc(74px + env(safe-area-inset-bottom)) !important;
  padding: 6px 8px calc(7px + env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
  border-radius: 0 !important;
  border-top: 1px solid #27213b !important;
  background: rgba(11,11,24,.97) !important;
  z-index: 55 !important;
  align-items: stretch;
}
#app .bottom-nav .nav-link { flex: 1 1 0; min-width: 0; }
/* A 500px page needs compact banner typography even on a wide monitor. */
#app .th26-hero {
  height: clamp(225px, 62vw, 300px) !important;
  margin: 12px 10px 0 !important;
  max-width: calc(100% - 20px) !important;
}
#app .th26-hero-copy {
  left: 15px !important; right: 15px !important; bottom: 14px !important;
  max-width: none !important;
}
#app .th26-hero-copy h1 { font-size: clamp(22px, 6vw, 30px) !important; }
#app .th26-hero-copy p { font-size: 12px !important; max-height: 48px !important; }
/* Admin tools must not inherit desktop 3/4-column layouts in a 500px shell. */
#app .admin-badges { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
#app .admin-actions { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
#app .admin-actions button { min-width: 0 !important; overflow-wrap: anywhere; }
#app .th26-user-row { grid-template-columns: auto minmax(0,1fr) !important; }
#app .th26-user-row .th26-block { grid-column: 1 / -1; width: 100%; }
