.app.guest-mode {
  display: flex;
  flex-direction: column;
}

.guest-page {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  min-height: 0;
}

.guest-page > .guest {
  width: min(520px, calc(100% - 28px));
}

.storyboard-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
}

.storyboard-main > .shot-list {
  flex: 1 0 auto;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  min-height: 30px;
  padding: 10px 12px 4px;
  overflow-x: auto;
  color: #8190a3;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
  scrollbar-width: thin;
}

.site-footer a {
  color: #91a7c0;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #d6e6f8;
  text-decoration: underline;
}

.guest-site-footer {
  margin-top: auto;
  padding-bottom: 16px;
}

.storyboard-site-footer {
  margin-top: 24px;
  border-top: 1px solid #273342;
}

@media (max-width: 760px) {
  .storyboard-main {
    min-height: 0;
  }

  .site-footer {
    justify-content: flex-start;
    gap: 12px;
    padding-inline: 4px;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-help {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: auto;
  padding: 14px 12px 16px;
  border-top: 1px solid #273342;
  background: #10141c;
}

.sidebar-help button {
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #3b4758;
  border-radius: 6px;
  background: #171d28;
  color: #e7ebf2;
  font: 600 12px/1.25 "Microsoft YaHei", sans-serif;
  cursor: pointer;
}

.sidebar-help button:hover,
.sidebar-help button:focus-visible {
  border-color: #8c7cff;
  background: #22283a;
  outline: none;
}

.agreement-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 12, .72);
}

.agreement-dialog {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(78vh, 760px);
  overflow: hidden;
  border: 1px solid #46536a;
  border-radius: 8px;
  background: #151a23;
  color: #f7f9fc;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

.agreement-dialog header,
.agreement-dialog footer {
  display: flex;
  align-items: center;
  padding: 16px 18px;
}

.agreement-dialog header {
  justify-content: space-between;
  border-bottom: 1px solid #303a4a;
}

.agreement-dialog header h2 { margin: 0; font-size: 18px; letter-spacing: 0; }
.agreement-dialog footer { justify-content: flex-end; border-top: 1px solid #303a4a; }
.agreement-content { overflow: auto; padding: 20px; color: #dce2eb; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.agreement-close { width: 32px; height: 32px; min-height: 32px; padding: 0; border: 1px solid #4d5b70; border-radius: 6px; background: #202835; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.agreement-close:hover, .agreement-close:focus-visible { background: #2b3545; border-color: #8c9ab0; outline: none; }

@media (max-width: 760px) {
  .sidebar-help { margin-top: 0; }
  .agreement-backdrop { padding: 10px; }
  .agreement-dialog { max-height: calc(100vh - 20px); }
}
