[hidden] { display: none !important; }
.account-gate { max-width: 38rem; margin: 12vh auto; padding: 2rem; font-family: sans-serif; }
body { height: auto; overflow: auto; }
/* Readable at normal browser zoom; keep headings and navigation unchanged. */
#accountWorkspace .inspector-panel label,
#accountWorkspace .inspector-panel input,
#accountWorkspace .inspector-panel textarea,
#accountWorkspace .central-preview-details dt,
#accountWorkspace .central-preview-details dd { font-size: 14px; line-height: 1.6; }
#accountWorkspace .inspector-panel p,
#accountWorkspace .inspector-panel .field-note,
#accountWorkspace .field-group-summary small,
#accountWorkspace .account-save-status,
#accountWorkspace .account-toolbar p { font-size: 13px; line-height: 1.6; }
#accountWorkspace .central-preview-caption { font-size: 16px; line-height: 1.6; }
@media (max-width: 700px) {
  #accountWorkspace .inspector-panel input,
  #accountWorkspace .inspector-panel textarea { font-size: 16px; }
}
@media (min-width: 1100px) {
  #accountWorkspace { --studio-inspector-width: clamp(420px, 30vw, 500px); }
}
.account-toolbar { padding: .75rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.account-toolbar summary { cursor: pointer; font-weight: 600; }
.account-toolbar summary span { font-weight: 400; color: var(--muted); margin-left: .5rem; font-size: .85rem; }
.account-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding-top: 1rem; }
.account-controls p { flex-basis: 100%; }
.account-save-status { padding: .5rem 1.25rem; margin: 0; color: var(--muted); font-size: .8rem; }
.account-toolbar button, .account-toolbar select { font: inherit; padding: .6rem .8rem; max-width: 100%; }
.account-toolbar select { background: var(--panel-raised); color: var(--text); border: 1px solid var(--line); border-radius: 8px; }
.account-toolbar p { flex-basis: 100%; margin: 0; font-size: .85rem; }
#accountWorkspace .app-shell { height: auto; min-height: 85vh; }
#accountWorkspace .workspace { display: flex; flex-direction: column; min-width: 0; height: auto; min-height: 100svh; overflow: visible; }
#accountWorkspace .workspace > * { flex-shrink: 0; }
#accountWorkspace .review-layout { flex-grow: 1; height: auto; align-items: start; }
#accountWorkspace .inspector-panel { height: auto; overflow: visible; }
#accountWorkspace .viewer-panel { align-content: start; grid-template-rows: auto auto; gap: 10px; padding: 12px 20px 20px; overflow: visible; }
#accountWorkspace .photo-frame {
  height: clamp(180px, calc(100svh - 290px), 640px);
  min-height: 0;
  max-height: 65svh;
  padding: 12px;
  background-size: contain;
}
#accountWorkspace .central-preview-image-wrap { height: min(55svh, 540px); min-height: 0; padding: 12px; }
#accountWorkspace .central-preview-image-wrap img { max-height: calc(min(55svh, 540px) - 24px); object-fit: contain; }
@media (max-width: 700px) {
  #accountWorkspace .viewer-panel { padding: 10px 12px 16px; }
  #accountWorkspace .photo-frame { height: 45svh; }
}
#accountWorkspace .brand img { max-width: 100%; height: auto; }
.brand-dark { display: none; }
:root[data-studio-theme="dark"] .brand-light { display: none; }
:root[data-studio-theme="dark"] .brand-dark { display: block; }
#accountWorkspace #archivePanel .archive-tools,
#accountWorkspace #archivePanel .archive-profile,
#accountWorkspace #blocArchiveMode,
#accountWorkspace #refreshBlocArchive,
#accountWorkspace [data-ai-field] { display: none; }

/* Archive uses the same warm surfaces and typography as Studio, with photos
   first and record-level details kept off the browsing grid. */
#accountWorkspace .hosted-archive { display: block; padding: 24px 32px; max-width: 1440px; width: 100%; box-sizing: border-box; }
#accountWorkspace .archive-mode #addPhotoButton { display: none; }
.hosted-archive-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.hosted-archive-intro p { margin: 0; color: var(--muted); }
.hosted-archive-search { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.hosted-archive-search label { width: 100%; font-weight: 600; }
.hosted-archive-search input { flex: 1; min-width: 180px; padding: 12px; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
#hostedArchiveStatus { margin: 20px 0; color: var(--muted); }
.hosted-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; margin-bottom: 24px; }
.hosted-archive-card { min-width: 0; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; overflow: hidden; }
.hosted-archive-open { display: block; width: 100%; text-align: left; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.hosted-archive-open h2 { margin: 16px 16px 8px; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.hosted-archive-card > p { margin: 0 16px 16px; font-size: 14px; color: var(--muted); }
.hosted-archive-image { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--photo-mat); overflow: hidden; }
.hosted-archive-image img { display: block; width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.hosted-archive-image span { padding: 20px; color: var(--muted); font-size: 14px; }
.hosted-archive-footnote { margin-top: 28px; color: var(--muted); font-size: 14px; }
.hosted-archive-pages { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
#archiveRecordDialog { width: min(760px, calc(100vw - 32px)); max-height: 90svh; overflow: auto; padding: 24px; box-sizing: border-box; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; }
#archiveRecordDialog::backdrop { background: rgba(0, 0, 0, .45); }
#archiveRecordContent h2 { font-size: 26px; line-height: 1.3; overflow-wrap: anywhere; }
#archiveRecordContent p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
#archiveRecordContent a.secondary-button { display: inline-flex; padding: 12px 16px; font-size: 16px; line-height: 1.4; text-decoration: none; }
#archiveRecordContent .hosted-archive-image { max-height: 50svh; }
.hosted-record-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 20px; margin: 24px 0; }
.hosted-record-details dt { color: var(--muted); }
.hosted-record-details dd { margin: 0; overflow-wrap: anywhere; }
.hosted-device-material { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.hosted-device-material summary { cursor: pointer; font-weight: 600; }
.hosted-archive button:focus-visible, .hosted-archive a:focus-visible, .hosted-archive input:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; }
@media (max-width: 700px) {
  #accountWorkspace .sidebar { flex-wrap: wrap; gap: 8px; }
  #accountWorkspace .sidebar .brand { flex: 1 0 100%; }
  #accountWorkspace .sidebar .nav-list { flex: 1 1 auto; }
  #accountWorkspace .sidebar-bottom { flex: 1 1 auto; justify-content: flex-end; }
  #accountWorkspace .hosted-archive { padding: 20px 16px; }
  .hosted-archive-intro { align-items: start; flex-direction: column; }
  .hosted-archive-search input { flex-basis: 100%; font-size: 16px; }
  .hosted-archive-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
}
#accountWorkspace .hosted-bloc { padding: 24px 32px; max-width: 1440px; font-size: 16px; }
.hosted-bloc fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.hosted-bloc legend { font-size: 1.25rem; font-weight: 650; margin-bottom: 16px; }
.bloc-profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 960px; }
.bloc-profile-fields label, .bloc-choice label { display: grid; gap: 8px; align-content: start; }
.hosted-bloc label { font-size: 14px; }
.bloc-profile-fields .bloc-about { grid-column: 1 / -1; }
.hosted-bloc input:not([type="checkbox"]):not([type="radio"]), .hosted-bloc textarea { width: 100%; box-sizing: border-box; font: inherit; }
.bloc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.bloc-choice { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--panel); min-width: 0; }
.bloc-choice-image { aspect-ratio: 4 / 3; display: grid; place-items: center; }
.bloc-choice-image img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.bloc-choice h3 { font-size: 1rem; overflow-wrap: anywhere; }
.bloc-choice label { display: flex; align-items: center; min-height: 44px; }
.bloc-choice input, .bloc-confirm input { width: 20px; height: 20px; flex-shrink: 0; }
.hosted-bloc dialog { width: min(900px, calc(100vw - 40px)); max-height: 90svh; overflow: auto; box-sizing: border-box; padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--panel); }
.hosted-bloc dialog::backdrop { background: rgb(0 0 0 / 45%); }
#blocPreviewContent img { display: block; max-width: 100%; width: auto; height: auto; max-height: 45svh; margin: 16px auto; object-fit: contain; }
#blocPreviewContent p { white-space: pre-wrap; overflow-wrap: anywhere; }
.bloc-confirm { display: flex; align-items: flex-start; gap: 12px; margin: 24px 0; }
@media (max-width: 700px) {
  #accountWorkspace .hosted-bloc { padding: 20px 16px; }
  .bloc-profile-fields { grid-template-columns: 1fr; }
  .hosted-bloc dialog { padding: 16px; }
}
