
/* FILAMENT / MOBILE POLISH — mobile-first layout safeguards */
:root{--film-gold:#d9b47b}
body{min-width:320px}
.footer,.moth-section,.moth-lab,.moth-collection,.moth-display,.profile-grid,.profile-card{min-width:0;max-width:100%;box-sizing:border-box}
.footer{overflow:hidden}
.footer-top{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr) minmax(0,.8fr);gap:clamp(24px,4vw,80px)!important;align-items:start}
.footer-top>div{min-width:0}
.footer .footer-wordmark{display:inline-flex!important;gap:9px!important;align-items:center!important;font-size:clamp(24px,2.5vw,36px);letter-spacing:.12em;white-space:nowrap}
.footer .footer-wordmark .brand-mark{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex:0 0 30px;line-height:0}
.footer .footer-wordmark svg{display:block;width:30px;height:30px;filter:drop-shadow(0 0 7px #d9b47b5c)}
.footer .footer-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 30px}
.footer .footer-links a{overflow-wrap:anywhere}
.footer .footer-stamp{line-height:1.6;overflow-wrap:anywhere}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px!important}
.moth-lab{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:clamp(18px,3vw,55px)!important;align-items:stretch}
.moth-collection{display:grid;align-content:start;gap:9px}
.lab-head{display:flex!important;flex-wrap:wrap;justify-content:space-between;gap:8px 15px;font:10px 'DM Mono',monospace!important;letter-spacing:.12em}
.moth-button{display:grid!important;grid-template-columns:32px minmax(0,1fr) 19px!important;align-items:center!important;gap:12px!important;text-align:left!important;width:100%!important;max-width:100%!important;min-height:70px;padding:12px 15px!important;box-sizing:border-box!important;overflow:hidden!important;background:#101716!important;color:#e8dfcf!important;border:1px solid #d0b58b48!important;border-radius:3px!important;white-space:normal!important;box-shadow:none!important}
.moth-button.selected{background:linear-gradient(100deg,#33382b,#181e1a)!important;border-color:#d8bb89b3!important}
.moth-button>span:nth-child(2){display:grid;gap:3px;min-width:0;max-width:100%;overflow:hidden}
.moth-button strong{display:block!important;font:600 12px/1.4 Manrope,sans-serif!important;letter-spacing:.055em!important;color:#e8d9b8!important;white-space:normal!important;overflow-wrap:anywhere!important}
.moth-button small{display:block!important;font:9px/1.45 'DM Mono',monospace!important;letter-spacing:.045em!important;color:#9d9f93!important;white-space:normal!important;overflow-wrap:anywhere!important}
.moth-button .list-arrow{display:flex;align-items:center;justify-content:center;width:18px;height:18px;font-size:0!important}
.moth-button .list-arrow:before{content:"";display:block;width:7px;height:7px;border-top:1.5px solid #cdb487;border-right:1.5px solid #cdb487;transform:rotate(45deg)}
.moth-glyph,.moth-visual,.profile-icon,.system-icon,.bulb-toggle-icon,.tiny-star,.ticker b{font-family:Georgia,'Times New Roman',serif!important;font-variant-emoji:text!important;text-shadow:none!important}
.moth-glyph{display:flex;align-items:center;justify-content:center;color:#d9b47b!important}
.moth-glyph svg,.profile-icon svg,.moth-visual svg,.footer .brand-mark svg{width:100%;height:100%;display:block;overflow:visible}
.moth-glyph svg{width:23px;height:23px}
.moth-display{overflow:hidden!important}
.moth-display h3,.moth-display p,.moth-footnote{overflow-wrap:break-word;max-width:100%}
.moth-meta{display:flex!important;flex-wrap:wrap!important;gap:9px 20px!important}
.profile-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
.profile-card{display:flex!important;flex-direction:column!important;gap:14px!important;padding:clamp(18px,2.5vw,32px)!important;overflow:hidden!important;border:1px solid #dfd6bb28!important;background:#111818!important;min-height:0}
.profile-card h3{margin:0!important;line-height:1.1!important;overflow-wrap:anywhere}
.profile-card p{overflow-wrap:break-word;line-height:1.7!important;margin:0!important}
.profile-card .profile-number{font:10px 'DM Mono',monospace!important;letter-spacing:.13em!important}
.profile-card .profile-icon{font-size:0!important;width:29px;height:29px;color:#d9b47b;flex:none}
.profile-card .profile-bottom{display:flex!important;gap:10px 20px!important;flex-wrap:wrap!important;margin-top:auto!important;overflow-wrap:anywhere}
.profile-card .profile-bottom span{font-size:10px!important;letter-spacing:.045em!important;white-space:normal!important;overflow-wrap:anywhere!important}
@media(max-width:900px){.footer-top{grid-template-columns:repeat(2,minmax(0,1fr))!important}.footer-top>div:first-child{grid-column:1/-1}.moth-lab{grid-template-columns:1fr!important}.moth-collection{gap:9px}}
@media(max-width:640px){
 .footer{padding:55px 5% 20px!important}
 .footer-top{grid-template-columns:1fr!important;gap:26px!important}
 .footer-top>div:first-child{grid-column:auto}
 .footer .footer-wordmark{font-size:clamp(25px,7.1vw,35px)!important;gap:7px!important}
 .footer .footer-wordmark .brand-mark{flex-basis:28px;width:28px;height:28px}
 .footer .footer-wordmark svg{width:28px;height:28px}
 .footer .footer-links{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px;row-gap:12px;margin:0!important}
 .footer .footer-stamp{margin:0!important}
 .footer-bottom{margin-top:35px!important;flex-direction:column;align-items:flex-start!important;gap:13px!important}
 .footer-bottom span,.footer-bottom a{font-size:9px!important;line-height:1.7!important;letter-spacing:.09em!important}
 .moth-section .container{width:90%}
 .moth-lab{gap:26px!important}
 .moth-button{grid-template-columns:27px minmax(0,1fr) 17px!important;gap:10px!important;min-height:63px!important;padding:12px 14px!important}
 .lab-head{font-size:9px!important}
 .moth-button strong{font-size:12px!important}
 .moth-button small{font-size:9px!important}
 .moth-display{padding:0!important}
 .moth-visual{font-size:28px!important;max-height:60px}
 .moth-display h3{font-size:clamp(28px,7vw,40px)!important}
 .moth-display p{font-size:14px!important;line-height:1.7!important}
 .moth-meta{gap:6px 12px!important}
 .moth-meta span{font-size:9px!important;line-height:1.55!important}
 .moth-footnote{font-size:12px!important;line-height:1.7!important}
 .profile-grid{grid-template-columns:1fr!important;gap:12px!important}
 .profile-card{padding:25px!important;gap:13px!important}
 .profile-card p{font-size:14px!important}
 .profile-card h3{font-size:clamp(26px,6.8vw,38px)!important}
 .profile-card .profile-bottom{margin-top:10px!important}
 .section-header{flex-wrap:wrap;gap:20px!important}
 .mechanics-layout,.weapon-gallery{min-width:0}
 .mechanic-shot img{max-width:100%}
}

/* FIX: decorative inline SVGs must never inherit unconstrained dimensions */
.tiny-star,.system-icon,.bulb-toggle-icon,.ticker b{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;line-height:1!important;vertical-align:middle!important}
.tiny-star{width:14px!important;height:14px!important;margin-right:7px!important;color:#d9b47b!important}
.tiny-star svg{display:block!important;width:14px!important;height:14px!important;max-width:14px!important;max-height:14px!important;flex:none!important}
.system-icon{width:38px!important;height:38px!important}
.system-icon svg{display:block!important;width:38px!important;height:38px!important;max-width:38px!important;max-height:38px!important}
.bulb-toggle-icon{width:22px!important;height:22px!important}
.bulb-toggle-icon svg{display:block!important;width:22px!important;height:22px!important;max-width:22px!important;max-height:22px!important}
.ticker b{width:18px!important;height:18px!important}
.ticker b svg{display:block!important;width:18px!important;height:18px!important;max-width:18px!important;max-height:18px!important}
@media(max-width:600px){.system-icon,.system-icon svg{width:32px!important;height:32px!important}}
