/* Mobile layout shared by the landing page, rules, profiles and community UI. */
.mobile-menu-toggle{display:none}
@media(max-width:700px){
  html{scroll-padding-top:20px;-webkit-text-size-adjust:100%}
  body{padding-bottom:env(safe-area-inset-bottom)}
  .wrap{width:calc(100% - 36px)}
  .header{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:12px 10px;min-height:80px;padding:18px 0;align-items:center}
  .header .brand{grid-column:1;grid-row:1;font-size:27px}
  .header .brand-icon{width:30px;height:32px;font-size:30px;margin-right:9px}
  .header .language-picker{grid-column:2;grid-row:1;order:initial;margin:0;font-size:0;gap:0}
  .header .language-picker select{font-size:12px;height:44px;max-width:112px;padding:8px;border-radius:10px}
  .mobile-menu-toggle{display:grid;place-items:center;grid-column:3;grid-row:1;width:44px;height:44px;border:1px solid #67313e;border-radius:10px;background:var(--panel);color:var(--text);cursor:pointer}
  .mobile-menu-toggle svg{width:22px;height:22px}
  .mobile-menu-toggle[aria-expanded=true]{background:#351c23;color:var(--accent)}
  .header nav{display:none;grid-column:1/-1;grid-row:2;order:initial;width:100%;margin:5px 0 0;gap:8px}
  .header.mobile-menu-open nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .header nav a,.header nav a:first-child{display:flex;align-items:center;min-height:48px;border:1px solid var(--line);border-radius:10px;padding:12px;font-size:12px;line-height:1.5;background:var(--panel)}
  .header nav .active{border-color:#67313e}
  .header .header-actions{display:none;grid-column:1/-1;grid-row:3;order:initial;margin:0;gap:8px}
  .header.mobile-menu-open .header-actions{display:flex}
  .header-actions .community-button{flex:1;min-height:46px;font-size:12px;padding:10px;min-width:0;border-radius:10px}
  .header-actions [data-account]{max-width:none}
  .hero{display:flex;flex-direction:column;min-height:auto}
  .hero-copy{width:100%;padding:38px 0 0;text-align:center}
  .hero-copy .eyebrow{justify-content:center;font-size:9px;letter-spacing:1.7px}
  .hero-copy h1{font-size:clamp(37px,9.1vw,60px);letter-spacing:-1.8px;line-height:1.12;margin:21px 0}
  .hero-copy .lead{font-size:14px;line-height:1.85;max-width:440px;margin:0 auto 24px}
  .hero-copy .lead br{display:initial}.hero-copy .lead br.desktop-break{display:none}
  .hero-copy .hero-server{width:min(100%,290px);margin:0 auto;gap:14px}
  .hero-server .button{width:100%;min-height:56px;font-size:19px;padding:16px 20px;border-radius:10px}
  .hero-server-version{font-size:12px}
  .hero-note{font-size:10px;margin-top:23px}
  .hero-art{width:100%;height:clamp(240px,66vw,360px);margin:0;overflow:hidden}
  .hero-art img{width:112%;height:auto;margin-left:-6%;max-height:410px}
  .hero-art:before{inset:0}
  .art-caption{bottom:14px;left:4%;right:4%;font-size:7px}
  .ticker-group{padding-block:14px;gap:25px}
  .about{padding:42px 0}
  .section-heading h2,.social-section h2{font-size:28px;line-height:1.25;letter-spacing:-1px}
  .section-heading>p{font-size:13px;line-height:1.8;margin-top:16px}
  .features{gap:12px;margin-top:24px}
  .features article{padding:22px;border-radius:13px}
  .features h3{font-size:20px;margin:16px 0 9px}
  .features p{font-size:13px;line-height:1.85}
  .start{gap:8px;padding:36px 0}
  .start-intro>p,.steps p{font-size:13px;line-height:1.8}
  .steps li{gap:18px;padding:22px 0}.steps h3{font-size:17px}
  .social-section{padding:32px 0 38px}
  .social-links{margin-top:22px;gap:10px}.social-link{min-height:82px;padding:17px;border-radius:12px}.social-link small{font-size:11px}
  footer.wrap{display:grid;grid-template-columns:1fr auto;gap:16px;padding:25px 0 96px;min-height:0}
  footer .brand{grid-column:1;grid-row:1}footer p{grid-column:1/-1;grid-row:2;font-size:11px}footer>span{grid-column:2;grid-row:1;font-size:10px;margin:0}
  .rules-page{padding:38px 0 46px}.rules-page h1{font-size:clamp(34px,9vw,48px);line-height:1.15}.rules-lead{font-size:14px}
  .rules-sections{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:25px}.rules-sections a{min-height:44px;padding:12px;font-size:12px;border-radius:9px}
  .rule-section{padding:30px 0;gap:20px}.rule-section h2{font-size:26px}.rule-section li{font-size:14px;line-height:1.9;padding-left:5px}.rules-page>.button{font-size:12px;max-width:100%;padding:17px}
  .community-dialog{width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:34px 24px 26px;border-radius:18px;overscroll-behavior:contain}
  .community-close{width:44px;height:44px;top:8px;right:8px}
  .community-dialog h2{font-size:28px;padding-right:10px}.community-dialog p{font-size:13px}
  .account-tabs button{min-height:44px;font-size:13px}.account-form label{font-size:12px}.account-form input,.chat-compose textarea,.community-dialog select,.access-form select{font-size:16px}
  .account-form input{min-height:48px;border-radius:10px}.account-form .community-button{min-height:48px;font-size:14px}.donation-link{min-height:52px;font-size:15px;padding:12px 8px}
  .chat-toggle{right:max(16px,env(safe-area-inset-right));bottom:calc(16px + env(safe-area-inset-bottom));min-height:52px;padding:14px 20px;font-size:14px}
  .chat-toggle[aria-expanded=true]{visibility:hidden}
  body.chat-open{overflow:hidden}
  .chat-panel{--compact-chat-height:min(440px,calc(var(--chat-viewport-height,100dvh) - 24px));top:calc(var(--chat-viewport-top,0px) + var(--chat-viewport-height,100dvh) - var(--compact-chat-height) - 12px);bottom:auto;left:auto;right:16px;width:min(320px,calc(100% - 32px));height:var(--compact-chat-height);max-height:none;border-radius:15px;z-index:30}
  .chat-heading{padding:12px 16px;padding-top:max(12px,env(safe-area-inset-top));flex-shrink:0}.chat-heading h2{font-size:18px}.chat-heading small{font-size:11px}.chat-heading button{width:44px;height:44px}
  .chat-messages{padding:16px;overscroll-behavior:contain}.chat-empty{font-size:14px}.chat-message{margin-bottom:20px}.chat-message>div{font-size:13px}.chat-message p{font-size:14px;line-height:1.75;padding:12px}.chat-message time{font-size:10px}
  .message-controls{gap:6px!important}.message-controls .community-button{font-size:11px;min-height:34px;padding:7px 10px}.chat-quote{font-size:12px}.chat-author .staff-shield svg{width:15px;height:17px}
  .chat-gate{padding:12px 14px;padding-bottom:max(12px,env(safe-area-inset-bottom));flex-shrink:0}.chat-gate p{font-size:12px}.chat-compose{gap:9px}.chat-compose textarea{padding:12px 48px 12px 12px;min-height:62px;max-height:110px;border-radius:10px}
  .chat-compose .emoji-tools{margin:4px}.chat-compose .emoji-tools>.community-button{width:40px;height:40px;font-size:22px}.chat-compose .emoji-list{width:200px}.chat-compose .emoji-list .community-button{min-height:40px}
  .chat-compose>[type=submit]{min-height:44px;font-size:13px}.chat-compose>[role=status]:empty{display:none}
  .profile-page{padding:36px 0 45px;min-height:55vh}.profile-page h1{font-size:32px}.profile-card{padding:22px 18px;border-radius:16px;overflow:visible}.profile-top{gap:14px}.profile-top>div:last-child{min-width:0}.profile-top h2{font-size:24px;line-height:1.3}.profile-avatar{width:60px;height:60px;border-radius:14px}
  .profile-stats{grid-template-columns:1fr;gap:0;margin:24px 0;padding-top:10px}.profile-stats>div{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--line)}.profile-stats dt{font-size:12px;margin:0}.profile-stats dd{font-size:17px}
  .profile-actions{gap:8px}.profile-actions .community-button{min-height:44px;flex:1;font-size:12px}.profile-comment{font-size:14px}.profile-comment .community-button{min-height:36px;font-size:12px}
  .admin-table-wrap{overflow:visible;border:0}.admin-table{display:block;white-space:normal}.admin-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.admin-table tbody{display:grid;gap:14px}.admin-table tr{display:grid;grid-template-columns:64px minmax(0,1fr);padding:18px;background:var(--panel);border:1px solid #67313e;border-radius:13px;gap:12px}.admin-table td{display:block;padding:0;border:0;min-width:0}.admin-table td:first-child{color:var(--muted);font-size:12px}.admin-table td:nth-child(2){font-size:17px;overflow-wrap:anywhere;font-weight:800}.admin-table td:nth-child(3){grid-column:1/-1}.admin-table td:nth-child(4){grid-column:1/-1;color:var(--muted);font-size:12px}.admin-table td:nth-child(5){grid-column:1/-1;border-top:1px solid var(--line);padding-top:14px}.access-form{min-width:0;gap:12px}.access-form select{width:100%;min-height:46px}.access-form label{font-size:13px;min-height:36px}.access-form input{width:20px;height:20px;accent-color:var(--accent)}.access-form button{min-height:44px;font-size:13px}.admin-pagination{flex-wrap:wrap;gap:10px;font-size:12px}.admin-pagination button{min-height:44px}
}
@media(max-width:360px){.wrap{width:calc(100% - 28px)}.header{gap:10px 6px}.header .brand{font-size:24px}.header .brand-icon{width:26px;height:28px;font-size:26px;margin-right:7px}.header .language-picker select{max-width:95px;font-size:11px}.hero-copy h1{font-size:35px}.hero-server .button{font-size:18px}}
@media(max-width:700px) and (max-height:500px){.chat-heading{padding:5px 12px}.chat-heading small{display:none}.chat-gate{padding:6px 12px}.chat-gate .chat-compose{grid-template-columns:minmax(0,1fr) 90px;gap:6px}.chat-gate .chat-compose textarea{min-height:44px;height:44px}.chat-gate .chat-compose>[type=submit]{grid-column:2;grid-row:1}.chat-gate .chat-compose>[role=status]{grid-column:1/-1}.chat-gate .reply-draft{margin-bottom:4px}}
