.auth-view {
  max-width: 1040px;
  margin: 0 auto;
  padding: 90px 48px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 100px;
  align-items: center;
  min-height: 90vh;
}
.auth-story .brand {
  margin-bottom: 60px;
}
.auth-story h1 {
  font: 400 clamp(30px, 3.4vw, 46px)/1.5 var(--serif);
  letter-spacing: 0.02em;
}
.auth-story p {
  line-height: 2;
  color: var(--muted);
  font-size: 14px;
  margin-top: 24px;
  max-width: 29ch;
}
.auth-form-panel {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.auth-form-panel h2 {
  font: 400 20px/1.6 var(--serif);
  margin-bottom: 24px;
}
.account-form label,
.space-dialog label {
  display: block;
  font-size: 13px;
  margin: 18px 0 8px;
}
.account-form input,
.space-dialog input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.account-form .primary-button {
  width: 100%;
  margin-top: 26px;
  justify-content: center;
}
.auth-mode-switch {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.auth-mode-switch button {
  font-size: 12px;
  padding: 8px 0;
  min-height: 40px;
}
.auth-mode-switch button[aria-pressed='true'] {
  color: var(--rust);
  border-bottom: 1px solid var(--rust);
}
.auth-footnote {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 24px;
}
.auth-local-link {
  display: inline-block;
  font-size: 12px;
  padding: 14px 0;
  color: var(--rust);
}
.account-message {
  font-size: 13px;
  line-height: 1.8;
  background: var(--paper);
  padding: 12px 14px;
  margin-top: 18px;
  overflow-wrap: anywhere;
}
.account-bar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 0 16px;
  margin-bottom: 24px;
}
.account-bar p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.account-bar-actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}
.account-bar button {
  font-size: 12px;
  min-height: 40px;
}
.space-dialog {
  width: min(570px, calc(100% - 32px));
  max-height: 88vh;
  overflow: auto;
  padding: 32px;
}
.space-dialog h3 {
  font: 400 17px/1.6 var(--serif);
  margin: 24px 0 10px;
}
.space-dialog section + section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 6px;
}
.space-dialog .text-button {
  font-size: 12px;
}
.space-dialog p {
  line-height: 1.9;
  font-size: 13px;
}
.space-dialog input {
  margin-bottom: 12px;
}
.space-dialog .dialog-close {
  position: sticky;
  top: 0;
  float: right;
}
.space-code {
  font-family: monospace !important;
  font-size: 13px !important;
}
.import-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.import-row span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.import-row button {
  flex-shrink: 0;
}
.publish-control {
  margin: 20px 0;
}
.publish-control label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.8;
}
.publish-control input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--rust);
}
.empty-shelf-note {
  align-self: center;
  max-width: 25ch;
  font: 400 18px/2 var(--serif);
  color: var(--muted);
  padding: 20px;
}
.local-mode-link {
  font-size: 12px;
  color: var(--rust);
  display: block;
  margin: 16px 0;
}
.account-loading #library-view {
  visibility: hidden;
}
@media (max-width: 700px) {
  .auth-view {
    padding: 36px 24px;
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: auto;
  }
  .auth-story .brand {
    margin-bottom: 28px;
  }
  .auth-story h1 {
    font-size: 30px;
  }
  .auth-story p {
    font-size: 13px;
    margin-top: 16px;
    max-width: 36ch;
  }
  .auth-form-panel h2 {
    font-size: 19px;
  }
  .account-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .account-bar-actions {
    width: 100%;
    justify-content: space-between;
  }
  .space-dialog {
    padding: 22px;
  }
  .import-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .auth-footnote {
    margin-top: 16px;
  }
}
