/* Full-stack layer: keeps the original AIStory visual language and improves readability. */
html, body { font-size: 15px; }
input[type=text], input[type=password], input[type=number], select, textarea { font-size: 13px; }
.sidebar, .rpanel { width: 286px; }
.topbar { min-height: 56px; height: auto; padding-block: 7px; }
.tab, .btn { font-size: 13px; }
.fs-login-copy { color: var(--tx2); font-size: 13px; line-height: 1.65; text-align: center; }
.fs-line-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border: 0; border-radius: var(--rmd); background: #06c755; color: white; font-weight: 700; text-decoration: none; }
.fs-line-button:hover { background: #05ae4b; }
.fs-line-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: white; color: #06c755; font-family: Arial,sans-serif; font-size: 11px; font-weight: 900; }
.fs-status { padding: 10px 12px; border-radius: var(--rmd); border: 1px solid var(--b2); color: var(--tx2); font-size: 12px; line-height: 1.6; text-align: center; }
.fs-status.warn { color: var(--amber); border-color: rgba(245,192,85,.3); background: rgba(245,192,85,.06); }
.fs-status.bad { color: var(--coral); border-color: rgba(240,96,80,.3); background: rgba(240,96,80,.06); }
.fs-admin-link { color: var(--amber) !important; border-color: rgba(245,192,85,.3) !important; text-decoration: none; }
.fs-server-api .apirow, .fs-server-api .savedbox, .fs-server-api .apibtns button:nth-child(2) { display: none !important; }
.fs-server-note { font-size: 11px; line-height: 1.55; color: var(--tx2); margin-bottom: 7px; }
body.no-image-generation [onclick*="genAnchorImg"],
body.no-image-generation [onclick*="regenScene"],
body.no-image-generation #genbtn,
body.no-story-ai [onclick*="genStory"] { display: none !important; }
.fs-modal-tools { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; padding-top: 10px; border-top: 1px solid var(--b1); }
.fs-share-on { color: var(--teal) !important; border-color: rgba(45,212,160,.35) !important; }
.fs-saving { opacity: .55; pointer-events: none; }

@media (max-width: 980px) {
  html, body { overflow: auto; }
  #appWrap { min-height: 100vh; height: auto; }
  .topbar { flex-wrap: wrap; }
  .topright { width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .appbody { flex-direction: column; overflow: visible; }
  .sidebar, .rpanel { width: 100%; max-height: none; border: 0; border-bottom: 1px solid var(--b1); }
  .sbscroll { max-height: 520px; }
  .center { min-height: 620px; }
  .rpanel { min-height: 360px; }
}

@media (max-width: 560px) {
  .lcard { width: calc(100% - 28px); padding: 30px 24px; }
  .tabs { width: 100%; overflow-x: auto; order: 5; }
  .tab { white-space: nowrap; }
  .chip, #apibadge, #projbadge { display: none; }
  .fs-modal-tools { grid-template-columns: 1fr; }
}
