/* Author hub and forms share the site glass tokens; no page-level editing controls. */
.author-dialog {
  z-index: 160;
  color: #ecf4ff;
  color-scheme: dark;
}
.author-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: var(--dialog-shade);
}
.author-panel {
  position: relative;
  width: min(var(--author-width, 520px), calc(100vw - 40px));
  max-height: min(820px, calc(100dvh - 80px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px;
  background: var(--dialog-fill);
  border: 1px solid rgb(219 237 255 / 48%);
  box-shadow: var(--dialog-shadow);
  backdrop-filter: var(--dialog-blur);
  -webkit-backdrop-filter: var(--dialog-blur);
  text-shadow: 0 1px 3px rgb(3 9 22 / 45%);
  border-radius: 0;
}
.author-panel h2 {
  font-size: clamp(22px, 2vw, 26px);
  padding-right: 25px;
  margin: 8px 0 16px;
}
.author-panel h3 {
  font-size: 14px;
  margin: 20px 0 10px;
}
.author-description {
  color: #c0cede;
  line-height: 1.7;
  margin: 0 0 16px;
}
.author-panel button,
.author-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  min-height: 36px;
  font: inherit;
  font-size: 13px;
  color: #ecf4ff;
  border: 1px solid rgb(218 236 255 / 34%);
  background: linear-gradient(
    150deg,
    rgb(227 242 255 / 12%),
    rgb(199 224 255 / 4%)
  );
  border-radius: 0;
  cursor: pointer;
}
.author-panel button:hover,
.author-upload:hover {
  border-color: rgb(223 244 255 / 75%);
  background: rgb(197 226 255 / 15%);
}
.author-panel :is(button, input, textarea, [contenteditable]):focus-visible {
  border-color: var(--focus-edge);
}
.author-panel button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.author-panel .author-close {
  position: absolute;
  right: 15px;
  top: 15px;
  padding: 7px;
}
.author-panel svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.author-panel .author-primary {
  background: rgb(225 239 255 / 18%);
  border-color: rgb(200 230 255 / 70%);
}
.author-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #c7d9ec;
  margin-bottom: 12px;
  min-width: 0;
}
.author-field input,
.author-field textarea {
  width: 100%;
  min-width: 0;
  color: #f1f6ff;
  font: inherit;
  font-size: 14px;
  border: 1px solid rgb(203 224 249 / 32%);
  border-radius: 0;
  background: rgb(231 243 255 / 5%);
  padding: 8px 10px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
}
.author-field textarea {
  resize: vertical;
  min-height: 64px;
}
.author-field :is(input, textarea)::placeholder {
  color: #c5d2e2;
  opacity: 1;
}
.author-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.author-list-tools,
.author-form-actions,
.author-media-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.author-form-actions {
  padding-top: 12px;
  border-top: 1px solid rgb(213 234 255 / 25%);
}
.author-item-list {
  display: grid;
  gap: 10px;
  min-height: 64px;
}
.author-panel .author-item {
  width: 100%;
  text-align: left;
  justify-content: space-between;
  padding: 12px;
}
.author-item strong {
  display: block;
  font-weight: 500;
  font-size: 16px;
}
.author-item small {
  display: block;
  margin-top: 7px;
  color: #b6cce2;
}
.author-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.author-upload:focus-within {
  border-color: var(--focus-edge);
}
.author-background-preview {
  width: 100%;
  height: 160px;
  object-fit: contain;
}
.author-cover-preview { flex-basis: 100%; }
.author-cover-preview:has(> img[hidden]) { display: none; }
.author-avatar-preview {
  width: 72px;
  height: 72px;
  object-fit: cover;
}
.author-panel [hidden] {
  display: none !important;
}
.author-editor-wrap {
  border: 1px solid rgb(211 233 255 / 30%);
  margin: 12px 0;
  overflow: hidden;
}
.author-editor-tools {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px;
  border-bottom: 1px solid rgb(211 233 255 / 25%);
}
.author-editor-tools button,
.author-editor-tools .author-upload {
  padding: 7px 10px;
}
.author-editor .tiptap {
  min-height: 220px;
  padding: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.author-editor .tiptap :is(h1, h2, h3) {
  margin: 20px 0 10px;
}
.author-editor .tiptap p {
  margin: 10px 0;
}
.author-editor .tiptap :is(ul, ol),
.author-preview :is(ul, ol) {
  padding-left: 24px;
}
.author-editor img,
.author-preview img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px 0;
}
.author-editor pre,
.author-preview pre {
  padding: 8px 10px;
  white-space: pre-wrap;
  background: rgb(7 16 30 / 35%);
}
.author-editor blockquote {
  padding-left: 15px;
  border-left: 2px solid #a8cfee;
}
.author-editor table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}
.author-editor :is(td, th) {
  border: 1px solid rgb(211 233 255 / 30%);
  padding: 8px;
  overflow-wrap: anywhere;
}
.author-preview {
  padding: 14px;
  border: 1px solid rgb(211 233 255 / 30%);
  min-height: 220px;
  overflow-wrap: anywhere;
}
.author-feedback {
  min-height: 24px;
  font-size: 13px;
  line-height: 1.6;
  color: #b3e2df;
}
.author-feedback.is-error {
  color: #ffbec8;
}
.author-files > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 12px;
}
.author-files a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c7e4ff;
}
.author-social-row {
  display: grid;
  grid-template-columns: 22px 1fr 2fr auto;
  gap: 12px;
  align-items: center;
}
.author-social-row button {
  margin-top: 8px;
}
.author-discard {
  position: sticky;
  bottom: 0;
  padding: 12px;
  background: var(--dialog-fill);
  backdrop-filter: var(--dialog-blur);
  border: 1px solid #829ebd;
  box-shadow: 0 -8px 25px rgb(0 0 0 / 20%);
}
.author-discard p {
  margin-bottom: 12px;
}
.author-discard button {
  margin-right: 8px;
}

.author-dialog[data-size="login"] {
  --author-width: 400px;
}
.author-dialog[data-size="list"] {
  --author-width: 600px;
}
.author-dialog[data-size="editor"] {
  --author-width: 760px;
}
.author-panel .author-back {
  padding: 0 4px;
  margin: -4px 0 8px;
  min-height: 28px;
  border: 0;
  background: none;
  color: #d0e0ef;
  font-size: 12px;
}
.author-panel .eyebrow {
  display: none;
}
.author-panel [tabindex="-1"]:focus-visible {
  box-shadow: none;
}
.author-menu-group h3 {
  color: #d0e0ef;
  font-weight: 400;
}
.author-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.author-panel .author-menu-grid button {
  gap: 10px;
  padding: 12px;
  text-align: left;
  justify-content: flex-start;
}
.author-menu-grid button > span {
  flex: 1;
  min-width: 0;
}
.author-menu-grid strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.author-menu-grid small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #d0dbe9;
}
.author-menu-grid button > svg:last-child {
  width: 13px;
  opacity: 0.7;
}
.author-menu-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid rgb(216 233 252 / 24%);
}
.author-feedback:empty {
  display: none;
}
.author-editor-wrap:focus-within {
  border-color: var(--focus-edge);
}
.author-editor .tiptap:focus {
  outline: none;
  box-shadow: none;
}
@media (max-width: 600px) {
  .author-panel {
    width: calc(100vw - 20px);
    padding: 24px 18px;
    max-height: calc(100dvh - 24px);
  }
  .author-two {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .author-social-row {
    grid-template-columns: 1fr auto;
  }
  .author-social-row .author-field { grid-column: 1/-1; }
  .author-panel :is(button, .author-upload, input) {
    min-height: 44px;
  }
  .author-menu-grid {
    grid-template-columns: 1fr;
  }
  .author-field :is(input, textarea) {
    font-size: 16px;
  }
}

.author-platform-preview { color: #c2ddf3; }
.author-color-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; margin: 16px 0; }
.author-card-colors .react-colorful { width: 100%; height: 180px; }
.author-card-colors .react-colorful__saturation, .author-card-colors .react-colorful__hue { border-radius: 0; }
.author-card-colors .react-colorful__hue { height: 18px; }
.author-card-colors .react-colorful__pointer { width: 16px; height: 16px; box-shadow: 0 1px 4px #0005; }
.author-card-colors .react-colorful__interactive:focus .react-colorful__pointer { transform: translate(-50%,-50%); }
.author-color-values { min-width: 0; }
.author-color-strength { min-height: 90px; font-size: 12px; line-height: 1.8; }
.author-color-targets, .author-color-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.author-color-targets button { flex: 1 1 auto; }
.author-color-targets button[aria-pressed="true"], .author-color-presets button[aria-pressed="true"] { border-color: #dcecff; background: rgb(220 236 255 / 15%); }
.author-color-presets button { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.author-color-presets span { width: 12px; height: 12px; border: 1px solid rgb(255 255 255 / 35%); }
.author-color-values .author-field { margin-bottom: 12px; }
.author-color-values input[type="range"] { height: 24px; min-height: 24px; padding: 0; border: 0; box-shadow: none; }
.glass-preview-scene { min-height: 122px; padding: 18px; background-size: cover; background-position: center; margin-top: 16px; }
.glass-preview-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid color-mix(in srgb, var(--preview-edge) calc(var(--card-edge-opacity) * 100%), transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--card-tint) calc(var(--card-opacity) * 100%), transparent), color-mix(in srgb, var(--card-tint) calc(var(--card-opacity) * 55%), transparent)); backdrop-filter: blur(6px); }
.glass-preview-card strong { color: color-mix(in srgb, var(--preview-accent) calc(var(--accent-opacity) * 100%), transparent); }
.glass-preview-scene[data-reading="true"] .glass-preview-card {
  background: color-mix(in srgb, var(--article-background-color) calc(var(--article-background-opacity) * 100%), transparent);
}
.glass-preview-scene[data-reading="true"] .glass-preview-card :is(strong, span) {
  color: color-mix(in srgb, var(--article-text-color) calc(var(--article-text-opacity) * 100%), transparent);
}
.glass-preview-card span { font-size: 12px; }
@media(max-width: 480px) { .author-color-layout { grid-template-columns: 1fr; } }
.author-text-options { width: 100%; font-size: 12px; }
.author-article-templates { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.author-article-templates p { flex-basis: 100%; font-size: 12px; line-height: 1.8; }
.author-text-options summary, .author-music-sources summary { padding: 10px 0; cursor: pointer; color: #dbeaff; }
.author-text-palette, .author-text-fonts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.author-text-palette button { display: inline-flex; align-items: center; gap: 6px; }
.author-text-palette span { width: 12px; height: 12px; background: var(--swatch); border: 1px solid rgb(255 255 255 / 45%); }
.author-platform-preview { align-self: center; }
@media(max-width: 600px) {
  .author-social-row { grid-template-columns: 22px minmax(0,1fr) 38px; }
  .author-social-row .author-field:nth-of-type(1) { grid-column: 2 / -1; grid-row: 1; }
  .author-social-row .author-field:nth-of-type(2) { grid-column: 1 / 3; grid-row: 2; }
  .author-social-row > button { grid-column: 3; grid-row: 2; width: 38px; padding: 8px; }
  .author-platform-preview { grid-column: 1; grid-row: 1; }
}

.author-background-gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin: 18px 0; }
.author-background-tile { border: 1px solid rgb(214 232 255 / 30%); min-width: 0; overflow: hidden; }
.author-background-tile > img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.author-background-tile > div { padding: 10px; }
.author-background-tile strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.author-background-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.author-background-actions button { min-height: 32px; padding: 6px 8px; font-size: 12px; }
.author-deleted-backgrounds summary { cursor: pointer; font-size: 13px; padding: 10px 0; }
@media(max-width: 440px) { .author-background-gallery { grid-template-columns: 1fr; } }
