/* Profile workspace — UI-only 1.7.1. Existing theme tokens are retained. */
.profile-heading { margin-bottom: 22px; }
.profile-heading h1 { font-size: 26px; margin-bottom: 6px; }
.profile-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.profile-tabs button { appearance: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 12px 2px; margin-bottom: -1px; font: inherit; font-weight: 600; cursor: pointer; }
.profile-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.profile-tabs button:focus-visible, .profile-history summary:focus-visible, .profile-secondary summary:focus-visible, .target-details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.profile-workspace { display: grid; grid-template-columns: 208px minmax(0,1fr); background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.profile-sidebar { padding: 20px 14px; background: var(--card); border-right: 1px solid var(--border); min-width: 0; }
.profile-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 20px; font-size: 13px; }
.profile-sidebar .doc-nav { display: grid; gap: 24px; margin: 0; }
.profile-sidebar .doc-group { display: grid; gap: 4px; background: none; border: none; padding: 0; border-radius: 0; }
.profile-sidebar .doc-group-label { display: block; opacity: 1; color: var(--muted); background: none; font-size: 11px; font-weight: 600; padding: 0 10px 6px; letter-spacing: .02em; border-radius: 0; }
.profile-sidebar .doc-chip { display: block; width: 100%; text-align: left; padding: 9px 10px; border: none; border-radius: 7px; background: none; color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; box-shadow: none; }
.profile-sidebar .doc-chip.active { background: rgba(124,110,240,.12); color: var(--accent-2); font-weight: 700; }
.profile-sidebar .doc-chip:hover { background: rgba(124,110,240,.07); }
.profile-sidebar-note { padding: 24px 10px 0; margin: 24px 0 0; border-top: 1px solid var(--border); line-height: 1.8; font-size: 11px; }
.profile-editor-pane { min-width: 0; padding: 22px 24px 0; }
.profile-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.profile-document-title { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.profile-document-title h2 { font-size: 18px; margin: 0; overflow-wrap: anywhere; }
.profile-document-title code { font-size: 11px; background: transparent; padding: 0; }
.profile-editor-pane .toastui-editor-defaultUI { border-color: var(--border); border-radius: 8px; overflow: hidden; }
.profile-editor-pane .toastui-editor-toolbar { background: var(--bg); }
.profile-editor-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; }
.profile-save-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
#docUpdated { flex-basis: 100%; font-size: 11px; }
.profile-unsaved { color: #9d5d0b; }
.profile-history { border-top: 1px solid var(--border); padding: 16px 0 20px; }
.profile-history > summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.profile-history > summary span { margin-left: 10px; font-weight: 400; font-size: 11px; }
.profile-history .list { margin-top: 12px; }
.profile-targets-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 6px 0 18px; }
.profile-targets-head h2 { font-size: 18px; margin: 0 0 6px; }
.profile-targets-head p { margin: 0; font-size: 13px; }
.profile-help { display: flex; gap: 8px 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; padding: 14px 16px; background: rgba(124,110,240,.055); border-radius: 8px; margin-bottom: 22px; }
.profile-help strong { color: var(--text); font-weight: 600; }
.profile-target-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 18px; list-style: none; padding: 0; margin: 0; }
.release-target { display: block; min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 22px; background: var(--bg-2); }
.target-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.target-kind { color: var(--muted); font-size: 11px; }
.target-card-head h3 { margin: 4px 0 0; font-size: 18px; overflow-wrap: anywhere; }
.target-status { color: var(--text); background: rgba(124,110,240,.08); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 11px; line-height: 1.5; flex-shrink: 0; }
.target-status.needs-attention { background: rgba(191,120,28,.09); color: #97560a; border-color: rgba(191,120,28,.25); }
.target-next { font-size: 13px; line-height: 1.8; margin: 18px 0 16px; min-height: 46px; }
.target-docs { display: flex; flex-wrap: wrap; gap: 6px; }
.target-docs span { font-size: 11px; padding: 3px 8px; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; }
.target-timestamp { margin: 16px 0 20px; font-size: 11px; }
.target-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.target-actions .btn { font-size: 12px; padding: 8px 11px; }
.target-actions .ghost { margin-left: auto; }
.target-action-hint { font-size: 11px; margin: 10px 0 0; min-height: 18px; }
.target-details { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.target-details summary { font-size: 11px; color: var(--muted); cursor: pointer; }
.target-details dl { font-size: 11px; display: grid; gap: 6px; }
.target-details dt { color: var(--muted); margin-top: 6px; }
.target-details dd { margin: 0; overflow-wrap: anywhere; }
.target-details code { font-size: 10px; }
.profile-secondary { margin: 28px 0; padding: 18px 0; border-top: 1px solid var(--border); }
.profile-secondary > summary { cursor: pointer; color: var(--muted); font-size: 12px; }
#profileLegacy h3 { font-size: 13px; margin: 24px 0 8px; }
.profile-log-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.profile-log-row time { color: var(--muted); }
.profile-empty, .profile-loading { grid-column: 1/-1; text-align: center; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); padding: 50px 24px; }
.profile-empty-kicker { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.profile-empty h3 { font-size: 21px; margin: 0 0 12px; letter-spacing: -.02em; }
.profile-empty > p,.target-next,.profile-help,.profile-heading p { word-break: keep-all; overflow-wrap: break-word; }
.profile-empty > p { color: var(--muted); font-size: 13px; line-height: 1.9; margin: 0 0 24px; }
.profile-empty-steps { display: flex; justify-content: center; gap: 50px; margin: 34px auto 0; padding: 24px 0 0; border-top: 1px solid var(--border); max-width: 580px; list-style: none; }
.profile-empty-steps li { display: grid; gap: 5px; text-align: left; }
.profile-empty-steps b { font-size: 12px; font-weight: 600; }
.profile-empty-steps span { font-size: 11px; color: var(--muted); }
.target-summary-settings { padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.target-summary-settings summary { cursor: pointer; font-size: 12px; }
.target-summary-settings label.check { white-space: normal; align-items: flex-start; margin-top: 12px; }
.target-setup pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); padding: 14px; border-radius: 8px; font-size: 12px; }
.release-error { color: var(--danger); padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; overflow-wrap: anywhere; }
.release-diff { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.release-diff pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; max-height: 450px; overflow: auto; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.release-change { min-width: 0; }
.release-change .row { margin-top: 12px; }
.release-change strong { overflow-wrap: anywhere; }
.release-change details { margin: 12px 0; }
#maintenanceRun { max-width: 100%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .profile-sidebar .doc-group-label { background: transparent; } :root:not([data-theme="light"]) .profile-sidebar .doc-chip.active { color: #b8afff; } :root:not([data-theme="light"]) .target-status.needs-attention,:root:not([data-theme="light"]) .profile-unsaved { color: #ecc18b; } }
:root[data-theme="dark"] .profile-sidebar .doc-group-label { background: transparent; }
:root[data-theme="dark"] .profile-sidebar .doc-chip.active { color: #b8afff; }
:root[data-theme="dark"] .target-status.needs-attention,:root[data-theme="dark"] .profile-unsaved { color: #ecc18b; }
@media (max-width: 800px) {
  .profile-workspace { grid-template-columns: minmax(0,1fr); }
  .profile-sidebar { border-right: 0; border-bottom: 1px solid var(--border); padding: 14px; }
  .profile-sidebar-head { padding-bottom: 10px; }
  .profile-sidebar .doc-nav { gap: 10px; }
  .profile-sidebar .doc-group { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
  .profile-sidebar .doc-group-label { padding: 0 6px; min-width: 74px; font-size: 10px; }
  .profile-sidebar .doc-chip { width: auto; max-width: 180px; padding: 7px 10px; }
  .profile-sidebar-note { display: none; }
  .profile-editor-pane { padding: 16px 14px 0; }
  .profile-target-grid { grid-template-columns: minmax(0,1fr); }
  .profile-targets-head { flex-direction: column; }
  .profile-targets-head > .row { width: 100%; justify-content: flex-end; }
}
@media (max-width: 520px) {
  .profile-tabs { gap: 24px; margin-bottom: 20px; }
  .profile-editor-head { align-items: flex-start; }
  .profile-document-title { flex-direction: column; gap: 3px; }
  .profile-editor-footer { align-items: flex-start; flex-direction: column; }
  .profile-editor-footer > .row { width: 100%; justify-content: flex-end; }
  .profile-history > summary span { display: block; margin: 5px 0 0 14px; }
  .profile-empty { padding: 36px 16px; }
  .profile-empty h3 { font-size: 18px; }
  .profile-empty-steps { gap: 20px; justify-content: space-between; }
  .profile-empty-steps span { max-width: 70px; }
  .release-target { padding: 18px; }
  .target-card-head h3 { font-size: 17px; }
  .release-diff { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { .profile-tabs button,.target-actions .btn { transition: none; } }
