.account-layout {
  max-width: 850px;
  margin: 0 auto;
}
.account-layout.wide {
  max-width: 1100px;
}
.account-panel {
  padding: 24px;
  margin: 20px 0;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 10px;
}
.account-panel h2 {
  margin-top: 0;
}
.account-form {
  display: grid;
  gap: 18px;
}
.account-form label {
  display: grid;
  gap: 7px;
}
.account-form input:not([type="checkbox"]),
.account-form textarea,
.account-form select {
  width: 100%;
  min-width: 0;
  background: #151a18;
  color: var(--text);
  border: 1px solid #59615d;
  border-radius: 5px;
  padding: 12px;
  font: inherit;
}
.account-form textarea {
  min-height: 110px;
  resize: vertical;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.account-form .check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-form .check input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}
.account-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.account-primary {
  background: var(--gold);
  color: #181b16;
}
.account-note {
  color: var(--muted);
  font-size: 14px;
}
.account-status {
  padding: 14px;
  border: 1px solid var(--edge);
  border-radius: 5px;
  white-space: pre-wrap;
}
.account-status:empty {
  display: none;
}
.account-error {
  border-color: #d28576;
  color: #ffd0c5;
}
.account-status a,
.account-panel a {
  color: var(--gold);
}
[hidden] {
  display: none !important;
}
.file-row,
.project-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--edge);
}
.file-row span,
.project-row span {
  overflow-wrap: anywhere;
}
.file-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.profile-bio {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.interest-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.interest-list span {
  padding: 6px 10px;
  border: 1px solid var(--edge);
  border-radius: 5px;
}
.download-builds {
  display: grid;
  gap: 12px;
}
.download-builds a {
  display: block;
  padding: 14px;
  background: #29302c;
  border: 1px solid var(--edge);
  border-radius: 6px;
}
.preview-frame {
  width: 100%;
  height: 460px;
  border: 0;
  border-radius: 8px;
  display: block;
}
.account-header {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.account-header a {
  color: var(--text);
}
progress {
  width: 100%;
  accent-color: var(--gold);
}
@media (max-width: 600px) {
  .field-row {
    grid-template-columns: 1fr;
  }
  .account-panel {
    padding: 18px;
  }
  .file-row,
  .project-row {
    align-items: flex-start;
    flex-direction: column;
  }
  header {
    flex-wrap: wrap;
    gap: 16px;
  }
  .preview-frame {
    height: 520px;
  }
}

.upload-intro {
  color: var(--muted);
  max-width: 65ch;
}
.preparation-panel {
  border-color: #665738;
}
.preparation-panel > p {
  max-width: 80ch;
}
.preparation-panel .eyebrow {
  font-size: 11px;
  margin-top: 0;
}
.preparation-panel h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-bottom: 12px;
}
.preparation-panel details {
  margin-top: 16px;
}
.preparation-panel summary {
  cursor: pointer;
  color: var(--muted);
}
.prompt-label {
  display: block;
  margin-top: 16px;
}
#agent-prompt-text {
  display: block;
  width: 100%;
  height: 260px;
  margin-top: 8px;
  padding: 12px;
  background: #151a18;
  color: var(--text);
  border: 1px solid var(--edge);
  border-radius: 6px;
  font: 13px/1.6 monospace;
  resize: vertical;
}
.upload-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  gap: 16px;
  margin: 24px 0;
}
.upload-steps li {
  border-left: 2px solid var(--gold);
  padding: 4px 14px;
}
.upload-steps b,
.upload-steps span {
  display: block;
}
.upload-steps span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.prepared-import {
  padding: 16px;
  border: 1px dashed #665738;
  border-radius: 6px;
}
.prepared-import input {
  max-width: 100%;
  font: inherit;
}
.prepared-files {
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.prepared-files li {
  margin: 8px 0;
}
#details-panel,
#files-panel {
  scroll-margin-top: 24px;
}
@media (max-width: 600px) {
  .upload-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.license-helper {
  margin: 0;
  padding: 20px;
  border: 1px solid #665738;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.license-helper legend {
  font-weight: 700;
  padding: 0 8px;
}
.license-helper p {
  margin: 0;
}
.license-helper details summary {
  cursor: pointer;
}
/* One-package creator flow */
.package-drop { border: 2px dashed #66756b; border-radius: 14px; padding: 28px 18px; text-align: center; background: #171d1a; transition: border-color .15s, background .15s; }
.package-drop.drag-over { border-color: #ffc247; background: #29291c; }
.package-symbol { color: #ffc247; font-size: 38px; line-height: 1; }
.package-picker { display: inline-flex; position: relative; padding: 12px 22px; border: 1px solid #7b897e; border-radius: 8px; font-weight: 700; cursor: pointer; overflow: hidden; }
.package-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.package-picker:focus-within { outline: 3px solid #9fe0ca; outline-offset: 4px; }
.package-files { list-style: none; padding: 0; }
.package-files li { padding: 12px 0; border-bottom: 1px solid #3c463f; overflow-wrap: anywhere; }
.package-files small { display: block; color: #b4bdb5; margin-top: 4px; }
.private-badge { font: 11px monospace; letter-spacing: .08em; color: #aad5b5; border: 1px solid #465f4e; padding: 6px 8px; border-radius: 5px; }
#package-title { margin: 12px 0; font-size: 24px; }
#package-progress { width: 100%; accent-color: #ffc247; }
.manual-editor { margin: 24px 0; }
.manual-editor > summary { cursor: pointer; padding: 18px 4px; color: #d3d9d2; }
.manual-editor[open] > summary { margin-bottom: 8px; }

.profile-overview-heading { justify-content: space-between; align-items: flex-start; }
.profile-overview-heading h2 { margin-bottom: 4px; overflow-wrap: anywhere; }
.profile-overview-heading .eyebrow { margin-top: 0; }
.account-settings > summary { padding: 18px 0; cursor: pointer; color: var(--muted); }

.panel-heading { justify-content: space-between; margin-bottom: 4px; }
.panel-heading h2 { margin: 0; }
.panel-heading a { color: var(--gold); font-size: 14px; }
#saved-collection, #uploads-collection, #public-saved-collection, #public-uploads-collection { margin: 16px 0; }

.package-files progress { display: block; height: 6px; margin-top: 8px; }
.package-files progress[hidden] { display: none; }

body.editing .preparation-panel, body.editing #package-panel { display: none; }
.project-heading { margin-bottom: 14px; }
.project-heading h1 { margin: 0 0 6px; overflow-wrap: anywhere; }
.project-summary { display: flex; align-items: flex-end; gap: 14px; }
.project-summary p { flex: 1; min-width: 0; margin: 0; }
.project-summary .text-button { flex: none; padding: 6px 4px; margin-bottom: -6px; white-space: nowrap; }
#description:not(.expanded) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.project-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; }
.project-meta-row .social-top { margin: 0; }
.project-meta-row p { margin: 0; }
#preview-permissions { margin-top: 12px; }
#preview-permissions label { display: flex; align-items: center; gap: 8px; margin: 0; }

.text-button { background: none; border: 0; padding: 0 4px; color: var(--gold); text-decoration: underline; min-height: 0; font-weight: 400; cursor: pointer; }
.license-options { display: grid; gap: 8px; margin: 10px 0; }
.license-option { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px; border: 1px solid var(--edge); border-radius: 8px; cursor: pointer; }
.license-option input { margin-top: 4px; width: auto; flex: none; }
.license-option b { display: block; }
.license-option small { display: block; color: var(--muted); margin-top: 2px; }
.license-option:has(input:checked) { border-color: var(--gold); background: #29291c; }
.license-option:focus-within { outline: 2px solid #9fe0ca; outline-offset: 2px; }

#publish-success { width: min(460px, calc(100% - 28px)); background: var(--panel); color: var(--text); border: 1px solid var(--edge); border-radius: 12px; padding: 30px 28px; text-align: center; }
#publish-success::backdrop { background: #000a; }
#publish-success h2 { margin: 6px 0; overflow-wrap: anywhere; }
#publish-success .account-actions { justify-content: center; margin-top: 18px; }
.success-mark { margin: 0; font-size: 34px; line-height: 1; color: var(--gold); }
a.link-button { display: inline-block; padding: 11px 18px; border-radius: 6px; font-weight: 700; text-decoration: none; }

.profile-avatar { width: 80px; height: 80px; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
