html,body{width:100%;max-width:100%;overflow-x:clip}
img,video,canvas,svg{max-width:100%}
.christmas-reward-chips{display:flex;flex-wrap:wrap;gap:.45rem;margin:.75rem 0}
.christmas-reward-chip{display:inline-flex;min-height:34px;align-items:center;gap:.35rem;border:1px solid rgba(242,209,137,.24);border-radius:999px;padding:.35rem .6rem;color:#f5dc9c;background:rgba(242,209,137,.08);font-size:.72rem;font-weight:700}
.christmas-door.is-current-day{outline:2px solid rgba(242,209,137,.85);outline-offset:1px;box-shadow:0 0 18px rgba(242,209,137,.16)}

@media(max-width:900px){
  #app-screen .app-layout{display:block;width:100%;max-width:100%;min-height:100svh;margin:0;padding:0 12px}
  #app-screen .sidebar,#app-screen .right-col{display:none}
  #app-screen .app-layout>.feed-col,
  #app-screen .app-layout>[id$="-view"]{box-sizing:border-box;width:100%;max-width:100%;min-width:0;padding-bottom:calc(82px + env(safe-area-inset-bottom))}
  #mobile-nav{position:fixed;right:0;bottom:0;left:0;z-index:90;display:flex;align-items:stretch;justify-content:space-around;gap:4px;overflow-x:auto;padding:7px 8px calc(7px + env(safe-area-inset-bottom));border:0;border-top:1px solid rgba(255,255,255,.1);border-radius:0;background:rgba(9,13,17,.96);box-shadow:0 -10px 32px rgba(0,0,0,.24);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
  .mobile-nav-btn{display:flex;min-width:0;min-height:48px;flex:1 1 0;align-items:center;justify-content:center;gap:3px;padding:4px 2px;color:#89949d;font-size:.68rem;line-height:1.1;white-space:nowrap;touch-action:manipulation}
  .mobile-nav-btn .icon{display:block;margin:0;font-size:1.05rem}
  .mobile-nav-btn.active,.mobile-nav-btn:hover{color:var(--zap);background:rgba(255,212,0,.09)}
  .mobile-nav-btn:focus-visible{outline:2px solid var(--zap);outline-offset:1px}
  #app-screen .app-layout>.feed-col{padding-top:.65rem}
  #app-screen .app-layout>.right-col{display:none}
  #app-screen .post-card,#app-screen .compose-box,#app-screen .widget-card{min-width:0}
  #app-screen .format-toolbar,.profile-tabs,.clan-tabs,.search-filters{max-width:100%;overscroll-behavior-x:contain}
  .modal-overlay{align-items:flex-end;padding:0 0 env(safe-area-inset-bottom)}
  .modal-box{box-sizing:border-box;width:min(100%,620px);max-width:100%;max-height:calc(100dvh - 12px - env(safe-area-inset-top));margin:0 auto;overflow-y:auto;border-radius:20px 20px 0 0}
  #toast-stack,#toast-history-panel,#toast-history-btn,#ia-floating-btn,#ia-floating-chat,#ach-toast{z-index:130}
  #toast-history-btn,#ia-floating-btn{display:none!important}
  #app-screen input,#app-screen select,#app-screen textarea,#auth-screen input,#mfa-screen input{font-size:16px}
  #messages-view{min-height:0;padding-top:.65rem}
  #messages-view .messages-layout{height:calc(100dvh - 82px - env(safe-area-inset-bottom));min-height:0}
  #messages-view .messages-sidebar,#messages-view .messages-main{min-height:0}
}

@media(min-width:901px){#mobile-nav{display:none}}

@media(max-width:700px){
  #auth-screen{box-sizing:border-box;min-height:100svh;min-height:100dvh;height:auto;padding:0;overflow-x:clip;overflow-y:auto}
  #auth-screen .auth-shell{display:block;min-height:100svh;min-height:100dvh;height:auto;overflow:visible}
  #auth-screen .auth-visual{position:relative;min-height:210px;height:auto;padding:1.5rem 1.15rem;align-items:center}
  #auth-screen .auth-visual:after{font-size:7rem}
  #auth-screen .auth-visual-content{width:100%;align-items:center;text-align:center;transform:none}
  #auth-screen .auth-mark{font-size:clamp(3.2rem,18vw,5rem)}
  #auth-screen .auth-kicker{max-width:24rem;margin:.75rem auto 0;font-size:.84rem}
  #auth-screen .auth-visual-footer{position:static;margin:1rem auto 0}
  #auth-screen .auth-card{box-sizing:border-box;width:calc(100% - 1rem);max-width:440px;margin:-.75rem auto 0;padding:1.35rem 1rem calc(1.5rem + env(safe-area-inset-bottom));border-radius:18px 18px 0 0}
  #auth-screen .auth-card>*,#auth-screen .auth-heading,#auth-screen .auth-tabs,#auth-screen #auth-error,#auth-screen #login-form,#auth-screen #register-form,#auth-screen .auth-legal{width:100%;max-width:100%}
  #auth-screen .auth-heading .logo{font-size:2.55rem}
  #auth-screen .auth-heading .logo-sub{margin:.35rem 0 1rem}
  #auth-screen .auth-tabs{margin-bottom:1rem}
  #auth-screen .auth-tab,#auth-screen .btn{min-height:46px}
  #auth-screen .form-group{margin-bottom:.8rem}
  #auth-screen .auth-password-label{align-items:flex-start}
  #auth-screen .auth-legal{margin-top:1rem}
  #mfa-screen{align-items:flex-end;padding:0 0 env(safe-area-inset-bottom)}
  #mfa-screen .mfa-card{box-sizing:border-box;width:100%;max-width:560px;margin:0 auto;padding:1.75rem 1.2rem calc(1.5rem + env(safe-area-inset-bottom));border-radius:22px 22px 0 0}
  #christmas-view{grid-column:auto;min-width:0;width:100%;padding:.4rem 0 calc(82px + env(safe-area-inset-bottom))}
  #christmas-view .christmas-page{box-sizing:border-box;width:100%;max-width:100%;margin:0;border-radius:18px;padding:.7rem}
  #christmas-view .christmas-hero{display:block;min-height:0;padding:1.1rem}
  #christmas-view .christmas-hero-art{display:none}
  #christmas-view .christmas-hero-copy{max-width:none}
  #christmas-view .christmas-hero h1{font-size:clamp(2rem,9vw,2.8rem);line-height:1}
  #christmas-view .christmas-hero-copy>p{max-width:none;margin:.75rem 0;color:rgba(255,255,255,.8);font-size:.9rem;line-height:1.5}
  #christmas-view .christmas-hero-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem}
  #christmas-view .christmas-primary-button,#christmas-view .christmas-share-button{min-height:46px;padding:.65rem .75rem;font-size:.78rem}
  #christmas-view .christmas-dashboard{grid-template-columns:minmax(0,1fr);gap:.65rem;margin-top:.65rem}
  #christmas-view .christmas-calendar-panel{padding:.75rem}
  #christmas-view .christmas-section-heading{align-items:center;margin-bottom:.65rem}
  #christmas-view .christmas-section-heading h2{font-size:1rem}
  #christmas-view .christmas-calendar-mark{font-size:.62rem}
  #christmas-view .christmas-calendar{grid-template-columns:repeat(4,minmax(0,1fr));gap:.45rem}
  #christmas-view .christmas-door{min-height:76px;align-items:center;padding:.5rem .2rem}
  #christmas-view .christmas-door-number{align-self:flex-start;margin-left:.15rem;font-size:1rem}
  #christmas-view .christmas-door-icon{font-size:1.2rem}
  #christmas-view .christmas-door-label{max-width:100%;font-size:clamp(.64rem,2.5vw,.72rem);line-height:1.05;text-align:center}
  #christmas-view .christmas-side-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
  #christmas-view .christmas-countdown-card{min-height:132px;padding:.8rem}
  #christmas-view .christmas-countdown-card>strong{font-size:1.35rem}
  #christmas-view .christmas-progress-card{padding:.8rem}
  #christmas-view .christmas-progress-numbers{align-items:flex-start;flex-direction:column;gap:.2rem}
  #christmas-view .christmas-progress-numbers strong{font-size:1rem}
  #christmas-view .christmas-progress-numbers span{font-size:.68rem}
  #christmas-view .christmas-progress-card>p{font-size:.7rem}
  #christmas-view .christmas-note-card{grid-column:1/-1}
  #christmas-view .christmas-reveal{align-items:flex-start;gap:.6rem;padding:.85rem 2.6rem .85rem .75rem}
  #christmas-view .christmas-reveal-icon{width:40px;height:40px}
  #christmas-view .christmas-reveal-copy{min-width:0}
  #christmas-view .christmas-reveal-copy h2{font-size:.95rem}
  #christmas-view .christmas-reveal-copy p{font-size:.82rem}
  #christmas-view .christmas-claim-panel{align-items:stretch;flex-direction:column}
  #christmas-view .christmas-claim-panel>span{font-size:.78rem}
  #christmas-view .christmas-claim-button,#christmas-view .christmas-reveal-action{min-height:46px;justify-content:center;font-size:.78rem}
}

.christmas-sync-note{display:flex;align-items:center;gap:.4rem;margin:.65rem .1rem 0;color:rgba(255,255,255,.62);font-size:.72rem}
.christmas-sync-note i{color:#8ed2a9}

@media(max-width:390px){
  #app-screen .app-layout{padding-right:8px;padding-left:8px}
  #mobile-nav{gap:1px;padding-right:4px;padding-left:4px}
  .mobile-nav-btn{font-size:.66rem}
  .mobile-nav-btn .icon{font-size:1rem}
  #auth-screen .auth-card{padding-right:.9rem;padding-left:.9rem}
  #christmas-view .christmas-side-column{grid-template-columns:minmax(0,1fr)}
  #christmas-view .christmas-note-card{grid-column:auto}
  #christmas-view .christmas-hero-actions{grid-template-columns:minmax(0,1fr)}
  #christmas-view .christmas-primary-button,#christmas-view .christmas-share-button{width:100%}
  #christmas-view .christmas-calendar{gap:.35rem}
  #christmas-view .christmas-door{min-height:72px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
