/* FUSSAI_PWA_UI_V1 */
:root{--fpwa-safe-top:env(safe-area-inset-top,0px);--fpwa-safe-bottom:env(safe-area-inset-bottom,0px)}
.fpwa-install-card{display:flex;align-items:center;gap:10px;width:100%;margin:10px 0 0;padding:10px;border:1px solid rgba(145,91,255,.28);border-radius:12px;background:linear-gradient(135deg,rgba(86,49,176,.18),rgba(237,72,215,.08));color:#fff;cursor:pointer;text-align:left}
.fpwa-install-card img{width:34px;height:34px;border-radius:9px;box-shadow:0 5px 18px rgba(140,66,255,.2)}
.fpwa-install-card span{display:grid;gap:2px;min-width:0}.fpwa-install-card b{font-size:11px}.fpwa-install-card small{font-size:9px;color:#aeb4c8}.fpwa-install-card:hover{border-color:rgba(188,125,255,.55);background:linear-gradient(135deg,rgba(104,54,207,.24),rgba(237,72,215,.12))}
.fpwa-install-card[hidden]{display:none!important}

.fpwa-modal-backdrop{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:18px;background:rgba(3,4,9,.72);backdrop-filter:blur(14px)}
.fpwa-modal-backdrop[hidden]{display:none!important}.fpwa-modal{width:min(520px,100%);max-height:min(760px,88vh);overflow:auto;border:1px solid rgba(151,115,255,.3);border-radius:22px;background:linear-gradient(160deg,#131629,#090b16);box-shadow:0 35px 120px rgba(0,0,0,.55);padding:22px;color:#f6f4fb}
.fpwa-modal-head{display:flex;align-items:center;gap:12px}.fpwa-modal-head img{width:58px;height:58px;border-radius:16px;box-shadow:0 12px 35px rgba(140,66,255,.28)}.fpwa-modal-head>div{flex:1;min-width:0}.fpwa-modal-head h2{margin:0;font-size:21px}.fpwa-modal-head p{margin:4px 0 0;color:#9fa7bd;font-size:11px;line-height:1.4}.fpwa-close{width:38px;height:38px;border:1px solid rgba(255,255,255,.1);border-radius:10px;background:#0b0d17;color:#fff;font-size:20px;cursor:pointer}.fpwa-steps{display:grid;gap:10px;margin:18px 0}.fpwa-step{display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start;padding:11px;border:1px solid rgba(255,255,255,.07);border-radius:12px;background:rgba(255,255,255,.025)}.fpwa-step>span{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:rgba(140,66,255,.14);color:#d4a3ff;font-weight:900}.fpwa-step b{display:block;font-size:12px}.fpwa-step small{display:block;margin-top:3px;color:#99a1b8;font-size:10px;line-height:1.5}.fpwa-modal-actions{display:flex;gap:8px;flex-wrap:wrap}.fpwa-modal-actions button{min-height:44px;padding:0 14px;border-radius:10px;border:1px solid rgba(255,255,255,.1);background:#111525;color:#fff;font-weight:800;cursor:pointer}.fpwa-modal-actions .primary{border:0;background:linear-gradient(105deg,#8c42ff,#ed48d7)}

.fpwa-mobile-topbar,.fpwa-bottom-nav{display:none}
@media(max-width:760px){
  html,body{max-width:100%;overflow-x:hidden}
  body.fd6.fpwa-has-bottom-nav{padding-bottom:calc(74px + var(--fpwa-safe-bottom))}
  .fpwa-mobile-topbar{position:fixed;z-index:44;left:0;right:0;top:0;min-height:58px;padding:calc(8px + var(--fpwa-safe-top)) 10px 8px 60px;display:flex;align-items:center;gap:10px;border-bottom:1px solid rgba(255,255,255,.07);background:rgba(8,9,18,.88);backdrop-filter:blur(18px);box-shadow:0 10px 35px rgba(0,0,0,.22)}
  .fpwa-mobile-topbar img{width:36px;height:36px;border-radius:10px;box-shadow:0 8px 24px rgba(140,66,255,.23)}.fpwa-mobile-title{display:grid;gap:0;min-width:0;flex:1}.fpwa-mobile-title b{font-size:14px;line-height:1.1}.fpwa-mobile-title small{font-size:8px;color:#8f97af;text-transform:uppercase;letter-spacing:.08em}.fpwa-mobile-install{width:38px;height:38px;display:grid;place-items:center;border:1px solid rgba(151,115,255,.26);border-radius:11px;background:rgba(140,66,255,.1);color:#fff;font-size:17px;cursor:pointer}.fpwa-mobile-install[hidden]{display:none!important}
  .fd6-mobile-menu{top:calc(9px + var(--fpwa-safe-top))!important;left:10px!important;width:40px!important;height:40px!important;border-radius:11px!important;background:rgba(17,20,35,.92)!important;backdrop-filter:blur(12px)}
  .fd6-main{padding-top:calc(76px + var(--fpwa-safe-top))!important;padding-bottom:calc(104px + var(--fpwa-safe-bottom))!important}
  .fpwa-bottom-nav{position:fixed;z-index:48;left:8px;right:8px;bottom:calc(7px + var(--fpwa-safe-bottom));display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:6px;border:1px solid rgba(151,115,255,.22);border-radius:17px;background:rgba(10,11,22,.94);backdrop-filter:blur(20px);box-shadow:0 18px 55px rgba(0,0,0,.45)}
  .fpwa-bottom-nav a{min-width:0;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:11px;color:#8f96ab!important;font-size:8px;font-weight:800;text-decoration:none}.fpwa-bottom-nav a>span{font-size:18px;line-height:1}.fpwa-bottom-nav a.active{color:#fff!important;background:linear-gradient(145deg,rgba(140,66,255,.24),rgba(237,72,215,.09));box-shadow:inset 0 0 0 1px rgba(181,111,255,.15)}
  .fd6-player{bottom:calc(76px + var(--fpwa-safe-bottom))!important}
  .fd62-head{padding-top:4px!important;padding-bottom:15px!important}.fd62-head h1{font-size:clamp(31px,10vw,40px)!important;letter-spacing:-1.4px!important}.fd62-head p{font-size:11px!important;line-height:1.5!important}.fd62-head-actions .fd6-btn{min-height:40px!important;flex:1}
  .fd62-create-panel{padding:11px!important;border-radius:18px!important}.fd62-panel-head{margin-bottom:12px!important;padding-bottom:12px!important}.fd62-panel-head h2{font-size:17px!important}
  .fd62-field input,.fd62-field textarea,.fd62-controls .control input,.fd62-controls .control select,.fd65-template-save input{font-size:16px!important}.fd62-field textarea{min-height:185px!important;line-height:1.5!important}.fd62-field input{height:48px!important}
  .fd62-controls{grid-template-columns:1fr!important}.fd62-controls .control{min-height:72px!important;padding:11px 12px!important}.fd62-controls .control label{font-size:10px!important}.fd62-wave{height:56px!important}.fd62-generate{min-height:54px!important;font-size:14px!important}.fd65-fast-generate{min-height:54px!important}
  .fd62-right{gap:9px!important}.fd62-plan-card,.fd65-prompts-card,.fd62-output-card,.fd62-tip-card{border-radius:16px!important}.fd65-template-save{grid-template-columns:1fr!important}.fd65-template-save button{min-height:44px!important}.fd65-template .button{min-height:38px!important}
  .fd65-guide-card>summary{min-height:64px}.fd65-guide-body p,.fd65-guide-body li{font-size:12px!important}.fd65-guide-body pre,.fd65-guide-body blockquote{font-size:11px!important}
  .fd6-sidebar{padding-top:calc(68px + var(--fpwa-safe-top))!important;padding-bottom:calc(20px + var(--fpwa-safe-bottom))!important}.fd6-sidebar .fd6-brand{display:none}
  .fd6-sidebar .fd6-nav a,.fd6-create{min-height:46px!important}.fd6-side-links{padding-bottom:6px}
  .fpwa-modal-backdrop{padding:10px}.fpwa-modal{border-radius:18px;padding:16px;max-height:86vh}.fpwa-modal-head h2{font-size:18px}
}

@media(max-width:420px){
  .fpwa-mobile-topbar{padding-right:8px}.fpwa-mobile-title small{display:none}.fpwa-mobile-topbar img{width:34px;height:34px}.fpwa-mobile-install{width:36px;height:36px}.fpwa-bottom-nav{left:5px;right:5px;bottom:calc(4px + var(--fpwa-safe-bottom));border-radius:15px}.fpwa-bottom-nav a{min-height:46px}
}

@media(display-mode:standalone){
  body.fd6{overscroll-behavior-y:contain}.fpwa-install-card,.fpwa-mobile-install{display:none!important}
}

/* FUSSAI_PWA_INSTALL_SURFACES_V2 */
.fpwa-chat-install{margin:8px 0 0;flex:0 0 auto}
.fpwa-inline-install{min-height:38px;padding:0 12px;border:1px solid rgba(151,115,255,.28);border-radius:10px;background:linear-gradient(135deg,rgba(86,49,176,.18),rgba(237,72,215,.08));color:#fff;font:700 12px/1 inherit;cursor:pointer}
.fpwa-inline-install:hover{border-color:rgba(188,125,255,.55);background:linear-gradient(135deg,rgba(104,54,207,.24),rgba(237,72,215,.12))}
.fpwa-inline-install[hidden]{display:none!important}
@media(max-width:820px){
  body.fc .fpwa-chat-install{margin:8px 0 2px;min-height:50px;padding:8px 10px;background:#11131f;border-color:#30354a}
  body.fc .fpwa-chat-install img{width:32px;height:32px}
  body.fc .fpwa-chat-install b{font-size:11px}
  body.fc .fpwa-chat-install small{font-size:8px}
}
@media(max-width:700px){.fi-actions .fpwa-inline-install{min-height:40px}}


/* FUSSAI_PWA_ANDROID_INSTALL_PENDING_FIX */
[data-fpwa-install][disabled]{opacity:.58!important;cursor:progress!important;pointer-events:none!important;filter:saturate(.7)}


/* FUSSAI_MOBILE_LAYOUT_FIX_20260907
 * Mobile dashboard must behave as a real mobile UI. Chat is intentionally excluded.
 */
@media(max-width:760px){
  html,body.fd6:not(.fc){width:100%;max-width:100%;overflow-x:clip}
  body.fd6:not(.fc).fpwa-has-bottom-nav{padding-bottom:0!important}
  body.fd6:not(.fc) .fpwa-bottom-nav{display:none!important}
  body.fd6:not(.fc) .fd6-main,
  body.fd6:not(.fc) .fi-main{width:100%;max-width:100%;min-width:0;margin-left:0!important;padding-left:10px!important;padding-right:10px!important;padding-bottom:34px!important;overflow-x:clip}
  body.fd6:not(.fc) .fd6-main>* ,
  body.fd6:not(.fc) .fd62-studio-grid,
  body.fd6:not(.fc) .fd62-studio-grid>* ,
  body.fd6:not(.fc) .fd62-create-panel,
  body.fd6:not(.fc) .fd62-right,
  body.fd6:not(.fc) .fd6-panel,
  body.fd6:not(.fc) .fd6-library-panel,
  body.fd6:not(.fc) .fd6-toolbar,
  body.fd6:not(.fc) .fd6-track,
  body.fd6:not(.fc) .fd6-public-row{min-width:0!important;max-width:100%!important}

  body.fd6:not(.fc) .fd62-head{padding:2px 2px 14px!important}
  body.fd6:not(.fc) .fd62-head h1{font-size:clamp(30px,9.4vw,38px)!important;line-height:1.03!important;margin-top:6px!important}
  body.fd6:not(.fc) .fd62-head p{font-size:12px!important;line-height:1.48!important}
  body.fd6:not(.fc) .fd62-head-actions{width:100%;display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px!important}
  body.fd6:not(.fc) .fd62-head-actions .fd6-btn{width:100%;min-width:0;padding:0 8px!important}
  body.fd6:not(.fc) .fd62-create-panel{padding:11px!important;overflow:hidden!important;border-radius:15px!important}
  body.fd6:not(.fc) .fd62-panel-head{align-items:flex-start!important;gap:8px!important}
  body.fd6:not(.fc) .fd62-panel-head>div{min-width:0!important}
  body.fd6:not(.fc) .fd62-plan-badge{flex:0 0 auto;max-width:38%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.fd6:not(.fc) .fd62-duo{grid-template-columns:minmax(0,1fr)!important;width:100%!important}
  body.fd6:not(.fc) .fd62-field{min-width:0!important;width:100%!important}
  body.fd6:not(.fc) .fd62-field input,
  body.fd6:not(.fc) .fd62-field textarea{display:block;width:100%!important;max-width:100%!important;min-width:0!important}
  body.fd6:not(.fc) .fd62-field textarea{min-height:145px!important;max-height:48vh}
  body.fd6:not(.fc) .fd65-field-head{gap:7px;min-width:0}
  body.fd6:not(.fc) .fd65-field-head label{min-width:0}
  body.fd6:not(.fc) .fd65-clear-field{flex:0 0 auto;font-size:10px}
  body.fd6:not(.fc) .fd62-controls{grid-template-columns:minmax(0,1fr)!important;width:100%!important}
  body.fd6:not(.fc) .fd62-controls .control{min-width:0!important;width:100%!important}
  body.fd6:not(.fc) .fd62-generate-row{width:100%!important;gap:8px!important}
  body.fd6:not(.fc) .fd65-fast-box,
  body.fd6:not(.fc) .fd65-fast-generate,
  body.fd6:not(.fc) .fd65-fast-steps,
  body.fd6:not(.fc) .fd62-generate{width:100%!important;max-width:100%!important;min-width:0!important}
  body.fd6:not(.fc) .fd62-legal,
  body.fd6:not(.fc) .fd62-status{min-width:0!important;padding:11px!important;overflow-wrap:anywhere}
  body.fd6:not(.fc) .fd62-right{grid-template-columns:minmax(0,1fr)!important;width:100%!important}
  body.fd6:not(.fc) .fd62-plan-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:7px!important}
  body.fd6:not(.fc) .fd62-plan-actions .button{width:100%!important;min-width:0!important}
  body.fd6:not(.fc) .fd65-prompts-card{padding:13px!important}
  body.fd6:not(.fc) .fd65-template-save{grid-template-columns:minmax(0,1fr)!important}

  body.fd6:not(.fc) .fd6-page-head{padding:6px 2px 15px!important}
  body.fd6:not(.fc) .fd6-page-head h1{font-size:clamp(28px,9vw,36px)!important;line-height:1.05!important}
  body.fd6:not(.fc) .fd6-page-head p{line-height:1.48!important}
  body.fd6:not(.fc) .fd6-toolbar{grid-template-columns:minmax(0,1fr)!important;padding:9px!important;gap:7px!important}
  body.fd6:not(.fc) .fd6-toolbar select,
  body.fd6:not(.fc) .fd6-search{width:100%!important;max-width:100%!important;min-width:0!important}
  body.fd6:not(.fc) .fd6-track{grid-template-columns:minmax(0,1fr)!important;gap:8px!important;margin:8px;border:1px solid var(--fd-border2);border-radius:12px;padding:11px!important;background:rgba(255,255,255,.018)}
  body.fd6:not(.fc) .fd6-track>*{grid-column:1!important;grid-row:auto!important;min-width:0!important;max-width:100%!important}
  body.fd6:not(.fc) .fd6-track-main{width:100%!important}
  body.fd6:not(.fc) .fd6-visibility{width:100%!important;max-width:100%!important;min-height:39px}
  body.fd6:not(.fc) .fd6-row-actions{justify-content:flex-start!important;flex-wrap:wrap!important}

  body.fd6:not(.fc) .fd6-public-row{grid-template-columns:minmax(0,1fr)!important;gap:8px!important;margin:8px;border:1px solid var(--fd-border2);border-radius:12px;padding:11px!important;background:rgba(255,255,255,.018)}
  body.fd6:not(.fc) .fd6-public-row>*{grid-column:1!important;grid-row:auto!important;min-width:0!important;max-width:100%!important}
  body.fd6:not(.fc) .fd6-public-row .fd6-author,
  body.fd6:not(.fc) .fd6-public-row .fd6-public-title{width:100%!important}
  body.fd6:not(.fc) .fd6-reactions{flex-wrap:wrap!important}

  body.fd6:not(.fc) .fd6-hero{min-width:0!important;padding-top:4px!important;gap:14px!important}
  body.fd6:not(.fc) .fd6-hero-copy h1{font-size:clamp(32px,10vw,40px)!important;letter-spacing:-1.6px!important}
  body.fd6:not(.fc) .fd6-status-grid,
  body.fd6:not(.fc) .fd6-launch-grid,
  body.fd6:not(.fc) .fd6-public-mini,
  body.fd6:not(.fc) .fd6-info-grid{grid-template-columns:minmax(0,1fr)!important}
  body.fd6:not(.fc) .fd6-launch,
  body.fd6:not(.fc) .fd6-info,
  body.fd6:not(.fc) .fd6-status-grid article{min-width:0!important;max-width:100%!important}

  body.fd6:not(.fc) .fi-main{padding-top:calc(72px + var(--fpwa-safe-top))!important}
  body.fd6:not(.fc) .fi-head{gap:12px!important;margin-bottom:15px!important}
  body.fd6:not(.fc) .fi-head h1{font-size:clamp(28px,9vw,36px)!important}
  body.fd6:not(.fc) .fi-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%!important;gap:7px!important}
  body.fd6:not(.fc) .fi-actions>*{width:100%!important;min-width:0!important;justify-content:center}
  body.fd6:not(.fc) .fi-grid{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  body.fd6:not(.fc) .fi-card{min-width:0!important;max-width:100%!important}

  body.fd6:not(.fc) input,
  body.fd6:not(.fc) textarea,
  body.fd6:not(.fc) select{max-width:100%;font-size:16px}
  body.fd6:not(.fc) img,
  body.fd6:not(.fc) audio,
  body.fd6:not(.fc) video{max-width:100%}
}

@media(max-width:430px){
  body.fd6:not(.fc) .fd6-main,
  body.fd6:not(.fc) .fi-main{padding-left:8px!important;padding-right:8px!important}
  body.fd6:not(.fc) .fd62-head-actions,
  body.fd6:not(.fc) .fd62-plan-actions,
  body.fd6:not(.fc) .fi-actions{grid-template-columns:minmax(0,1fr)!important}
  body.fd6:not(.fc) .fd62-panel-head{flex-wrap:wrap!important}
  body.fd6:not(.fc) .fd62-plan-badge{max-width:100%}
}
