/* v6.5 프로필: 이름 → 사진·활동 수치 → 소개. 계정 기능의 상태는 JS 가 지킨다. */
body.bg3 .bg3-main.profile-page { width: min(calc(100% - 2 * clamp(16px, 4.4%, 72px)), 1536px); max-width: none; padding-inline: 0; display: block; }
.profile-page > .account { justify-content: flex-end; gap: 12px; margin: 16px 0 0; }
.profile-page > .account .acctname { max-width: 100%; overflow-wrap: anywhere; }
.profile-page > .account .acctbtn { min-height: 44px; color: var(--text); border-color: var(--accent-quiet); }
.profile-page > #acctnotice { margin: 8px 0 0; }
.profile-page > #acctnotice:empty { display: none; }
.profile-page .title { text-align: left; padding: 0; margin-bottom: 22px; }
.profile-page .title::before, .profile-page .title::after { display: none; }
.profile-page > .profilepane { min-width: 0; padding: 28px 0; border: 0; background: none; }
.profile-page #pubprofile { padding-top: 32px; padding-bottom: 28px; }
.profile-page .profile-kicker { color: var(--accent); font: 400 var(--fs-sm)/1.5 var(--font-body); letter-spacing: .16em; margin: 0 0 16px; }
.profile-page .pfcard { display: grid; grid-template-columns: 136px minmax(0, 1fr); grid-template-areas: 'meta meta' 'avatar stats' 'about about'; gap: 22px 48px; align-items: center; padding: 0; border: 0; background: none; }
.profile-page .pfmeta { grid-area: meta; min-width: 0; }
.profile-page .pfname { margin: 0; font: 400 36px/1.3 var(--font-title); overflow-wrap: anywhere; }
.profile-page .pfhandle { margin: 6px 0 0; color: var(--text-2); overflow-wrap: anywhere; }
.profile-page .pfcard > .pfavatar { grid-area: avatar; width: 136px; height: 136px; font-size: 44px; border-radius: 0; overflow: hidden; border: 1px solid var(--accent); background: radial-gradient(circle, var(--surface-2), transparent); }
.profile-page .pfcard > .pfavatar .pfavatar-img { width: 100%; height: 100%; object-fit: contain; }
.profile-page .pfcard > .pfavatar .pfavatar-photo { object-fit: cover; }
.profile-page .pfstats { grid-area: stats; display: flex; gap: clamp(24px, 5vw, 64px); margin: 0; min-width: 0; }
.profile-page .pfstats > div { display: flex; flex-direction: column-reverse; gap: 6px; min-width: 0; text-align: center; }
.profile-page .pfstats dt { color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; }
.profile-page .pfstats dd { margin: 0; font-size: 27px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.profile-page .pfabout { grid-area: about; min-width: 0; }
.profile-page .pfbio { margin: 0; max-width: 800px; font-size: var(--fs-base); line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-page .pfroles { margin-top: 14px; }
.profile-page #pubprofilecard > .row { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.profile-page #pubprofilecard > .row:has([data-act='start-edit']) { margin: 0; }
.profile-page #pubprofilecard { position: relative; }
.profile-page #pubprofilecard [data-act='start-edit'] { position: absolute; right: 0; top: 0; border: 1px solid var(--accent-quiet); padding-inline: 18px; }
.profile-page #pubprofilecard:has([data-act='start-edit']) .pfmeta { padding-right: 140px; }
.profile-tabs { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.profile-tabs button { flex: 0 0 auto; min-height: 52px; padding: 12px 2px; color: var(--text-2); background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; cursor: pointer; white-space: nowrap; }
.profile-tabs button[aria-selected='true'] { color: var(--accent); border-bottom-color: var(--accent); }
.profile-tabs button:focus-visible, .pfphoto-pick:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.profile-page [data-profile-panel][data-inactive='true'] { display: none; }
.profile-page .clouddocs { margin: 0; padding: 0; list-style: none; }
.profile-page .clouddocs > li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.profile-page .clouddocs > li::before { content: ''; grid-column: 1; grid-row: 1 / span 3; width: 28px; height: 32px; border: 1px solid var(--accent-quiet); background: linear-gradient(135deg, transparent 70%, var(--accent-quiet) 71%); }
.profile-page .clouddocs .cdname { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
.profile-page .clouddocs .cdmeta, .profile-page .clouddocs .cdsum, .profile-page .clouddocs .cdpub { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
.profile-page .clouddocs .cdtake, .profile-page .clouddocs [data-follow-action] { grid-column: 3; }
.profile-page #pfform { max-width: 800px; }
.profile-page #pfform > .row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.profile-page #pfform > .row > label, .profile-page #pfform > .row > input, .profile-page #pfform > .row > textarea, .profile-page #pfform > .row > .hint { flex-basis: 100%; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.profile-page #pfform fieldset { margin: 22px 0; min-width: 0; }
.profile-page #pfform .pfchoice { max-width: 100%; box-sizing: border-box; }
.pfphoto-edit { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 0; }
.pfphoto-pick { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.pfphoto-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.profile-policies { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.profile-policies h3 { flex-basis: 100%; margin: 0; font-size: var(--fs-base); font-weight: 500; }
.profile-policies a { color: var(--text-2); min-height: 44px; display: inline-flex; align-items: center; }
.profile-page #authornotfound { padding: 64px 0; }
.profile-page[data-profile-view='notifications'] #pubprofile, .profile-page[data-profile-view='notifications'] #profiletabs { display: none; }
.profile-page[data-profile-view='notifications'] #notifications > .title { font-size: 32px; margin-top: 20px; }
@media (max-width: 767px) {
  .profile-page .pfcard { grid-template-columns: 80px minmax(0, 1fr); gap: 20px 18px; }
  .profile-page .pfcard > .pfavatar { width: 80px; height: 80px; font-size: 32px; }
  .profile-page #pubprofilecard [data-act='start-edit'] { padding-inline: 10px; }
  .profile-page #pubprofilecard:has([data-act='start-edit']) .pfmeta { padding-right: 108px; }
  .profile-page .pfname { font-size: 29px; }
  .profile-page .pfstats { gap: 0; justify-content: space-between; }
  .profile-page .pfstats dd { font-size: 23px; }
  .profile-page .pfstats dt { font-size: 12px; }
  .profile-tabs { gap: 22px; }
  .profile-page button, .profile-page .btn, .profile-page .pfchoice, .profile-page input:not([type='radio']):not([type='checkbox']) { min-height: var(--m-touch); }
  .profile-page .clouddocs > li { grid-template-columns: 28px minmax(0, 1fr); gap: 8px 12px; }
  .profile-page .clouddocs .cdtake, .profile-page .clouddocs [data-follow-action] { grid-column: 2; justify-self: start; }
}

/* v6.5 원본: 프로필 머리와 개요 두 열. 사용자 데이터가 없어도 같은 배치를 유지한다. */
.profile-v65 { --landscape-height: 560px; --landscape-position: 35%; --landscape-opacity: .3; --landscape-fade: 50%; --landscape-filter: none; }
.profile-v65 > header, .profile-v65 > main { position: relative; }
.profile-page #pubprofile { padding-top: 24px; padding-bottom: 26px; }
.profile-page .profile-kicker { margin-bottom: 6px; }
.profile-page .pfname { font-size: 28px; line-height: 1.25; }
.profile-page .pfcard { grid-template-columns: 140px minmax(0, 1fr); gap: 18px 48px; }
.profile-page .pfcard > .pfavatar { width: 140px; height: 140px; border: 1px solid var(--accent); outline: 1px solid var(--line); outline-offset: 4px; }
.profile-page .pfstats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); max-width: 420px; gap: 0; }
.profile-page .pfstats dd { font-size: 24px; }
.profile-page .pfstats button { font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; min-width: 44px; min-height: 44px; }
.profile-page .pfbio { font-size: 16px; }
.ph-metadata { display: flex; flex-wrap: wrap; gap: 12px 26px; padding: 30px 0 20px; color: var(--text-3); font-size: 12px; border-bottom: 1px solid var(--line); }
.profile-tabs { gap: 32px; margin: 0 0 26px; }
.ph-overview { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
.ph-section { margin: 0 0 36px; min-width: 0; }
.ph-heading { display: flex; align-items: center; gap: 18px; margin: 0 0 18px; font: 400 12px/1.6 var(--font-body); color: var(--accent); letter-spacing: .18em; }
.ph-heading::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.ph-rows { list-style: none; padding: 0; margin: 0; }
.ph-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); min-height: 48px; }
.ph-iconcol { width: 64px; display: flex; align-items: center; }
.ph-iconcol .clsicons { display: flex; gap: 0; flex-wrap: wrap; }
.ph-iconcol .clsico { width: 30px; height: 30px; }
.ph-rowtitle { font-size: 16px; color: var(--text); line-height: 1.5; overflow-wrap: anywhere; text-decoration: none; }
.ph-rowmeta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-3); font-size: 12px; margin-top: 4px; }
.ph-rowend { color: var(--text-3); font-size: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ph-eventmark, .ph-achievement-icon { display: grid; place-items: center; color: var(--accent); width: 40px; height: 40px; border: 1px solid var(--line); font-size: 24px; }
.ph-activity { grid-template-columns: 44px minmax(0, 1fr) auto; font-size: 14px; }
.ph-activity time { color: var(--text-3); font-size: 12px; }
.ph-empty { color: var(--text-3); margin: 20px 0; font-size: 14px; }
.ph-text { color: var(--accent); border: 0; background: none; padding: 12px 0; font: inherit; cursor: pointer; }
.ph-heat-total { font-size: 20px; margin: 18px 0; }
.ph-heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); grid-template-columns: repeat(12, 14px); gap: 3px; }
.ph-day { border-radius: 2px; }
.ph-day-0 { background: var(--surface-2); }.ph-day-1 { background: color-mix(in srgb,var(--accent) 25%,var(--surface-2)); }.ph-day-2 { background: color-mix(in srgb,var(--accent) 50%,var(--surface-2)); }.ph-day-3 { background: color-mix(in srgb,var(--accent) 75%,var(--surface-2)); }.ph-day-4 { background: var(--accent); }
.ph-heat-legend { display: flex; align-items: center; gap: 4px; margin: 16px 0; color: var(--text-3); font-size: 12px; }
.ph-heat-legend i { width: 12px; height: 12px; border-radius: 2px; }
.ph-weekly { border-bottom: 1px solid var(--line); padding-bottom: 16px; }.ph-weekly summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }.ph-weekly table { width: 100%; font-size: 12px; text-align: left; }
.ph-achievements { list-style: none; padding: 0; margin: 0; }.ph-achievements li { display: flex; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--text-3); }.ph-achievements li.earned { color: var(--text); }.ph-achievements small { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }.earned .ph-achievement-icon { border-color: var(--accent); }
.ph-settings { max-width: 860px; }.ph-setting { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: 20px; border-bottom: 1px solid var(--line); }
.ph-switch { width: 46px; height: 44px; padding: 0; background: none; border: 0; position: relative; cursor: pointer; flex-shrink: 0; }.ph-switch::before { content: ''; position: absolute; top: 12px; left: 0; width: 44px; height: 22px; border: 1px solid var(--line); background: var(--surface-2); }.ph-switch::after { content: ''; position: absolute; width: 14px; height: 14px; top: 17px; left: 5px; background: var(--text-3); }.ph-switch[aria-checked=true]::before { border-color: var(--accent); }.ph-switch[aria-checked=true]::after { left: 26px; background: var(--accent); }
.ph-private { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); padding: 8px 18px; margin-bottom: 24px; font-size: 14px; }
.ph-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.68); display: flex; justify-content: flex-end; }.ph-drawer { background: var(--bg); border-left: 1px solid var(--line); width: min(540px,100%); box-sizing: border-box; padding: 24px; overflow-y: auto; }.ph-drawer h2 { margin: 0 70px 18px 0; font-size: 20px; }.ph-close { float: right; }.ph-drawer button { min-height: 44px; background: none; border: 1px solid var(--line); padding: 8px 12px; color: var(--text); cursor: pointer; }.ph-people-tabs { display: flex; flex-wrap: wrap; gap: 8px; }.ph-people-tabs [aria-pressed=true] { border-color: var(--accent); color: var(--accent); }.ph-person { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }.ph-person a { overflow-wrap: anywhere; }.ph-person small { display: block; color: var(--text-3); font-size: 12px; }.ph-person > span:last-child { display: flex; gap: 6px; }.ph-initial { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); }
.profile-page #pfform { max-width: none; position: relative; }.ph-edit-done { position: absolute; top: 0; right: 0; }.ph-edit-fields { max-width: 760px; margin-top: 24px; }.ph-edit-fields summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }.profile-page .pfphoto-edit { position: absolute; top: 184px; left: 100px; margin: 0; }.pfphoto-pick { min-height: 44px; min-width: 44px; background: var(--bg); }.profile-page #pfform > .row { max-width: 760px; }
.profile-page #following, .profile-page #notifications { display: none; }
.profile-page .pfphoto-pick { width: 44px; padding: 10px; box-sizing: border-box; }
.profile-page .pfphoto-pick svg { width: 22px; height: 22px; }
.profile-page .site-info { color: var(--text-2); font-size: var(--fs-sm); }
.profile-page .site-info summary { min-height: 44px; cursor: pointer; align-content: center; }
.profile-page .footnote { margin-top: 40px; padding: 16px 0 40px; text-align: left; }
.ph-locked { padding: 64px 20px; text-align: center; border-top: 1px solid var(--line); color: var(--text-2); }
.ph-locked h2 { color: var(--text); font-size: 20px; font-weight: 400; }
#authorcard { position: relative; }
#authorfollow { position: absolute; top: 0; right: 0; }
#authorcard .pfmeta { padding-right: 150px; }
@media(max-width:1023px) { .ph-overview { grid-template-columns: minmax(0,1fr) 270px; gap: 28px; } }
@media(max-width:767px) {
 .profile-v65::before { height: 460px; }.profile-page #pubprofile { padding-top: 24px; }.profile-page .pfname { font-size: 22px; }.profile-page .pfcard { grid-template-columns: 80px minmax(0,1fr); gap: 20px 18px; }.profile-page .pfcard > .pfavatar { width: 80px; height: 80px; }.profile-page .pfstats { gap: 12px; justify-content: space-between; }.profile-page .pfstats dd { font-size: 20px; }.profile-page .pfstats dt { font-size: 11px; }.profile-page .pfbio { font-size: 14px; }.ph-metadata { gap: 10px 20px; padding: 22px 0 16px; }.profile-tabs { gap: 24px; }.ph-overview { display: block; }.ph-overview > aside { margin-top: 32px; }.ph-row { grid-template-columns: 48px minmax(0,1fr); gap: 12px; padding: 16px 0; }.ph-iconcol { width: 48px; }.ph-iconcol .clsico { width: 24px; height: 24px; }.ph-rowend { grid-column: 2; flex-direction: row; align-items: center; }.ph-rowtitle { font-size: 14px; }.ph-activity { grid-template-columns: 36px minmax(0,1fr); }.ph-activity time { grid-column: 2; }.ph-drawer { width: 100%; padding: 20px 16px; }.ph-person { gap: 8px; }.ph-person > span:last-child { flex-direction: column; }.profile-page .pfphoto-edit { top: 111px; left: 52px; }.ph-edit-done { font-size: 12px; }.ph-heat { grid-template-rows: repeat(7,16px); grid-template-columns: repeat(12,16px); }.ph-setting { font-size: 14px; }
}

.ph-rowtext { min-width: 0; }
.ph-dialog-error { color: var(--text-2); overflow-wrap: anywhere; }
.profile-page .ph-metadata, .profile-page .ph-rowmeta, .profile-page .ph-rowend, .profile-page .ph-activity time, .profile-page .ph-heat-legend { color: var(--text-2); }
body.bg3 .profile-page .ph-rowtitle, body.bg3 .profile-page .ph-activity a { color: var(--text); text-decoration: none; }
.ph-earned { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-height: 32px; padding-top: 16px; }
.ph-earned > span { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); color: var(--text-2); font-size: 12px; min-height: 30px; }
.ph-initial img { width: 100%; height: 100%; object-fit: cover; }

/* 목록의 제목 링크는 유지하고, 읽기 전용 미리보기 한 곳을 누른 행 안으로 옮긴다. */
.ph-build-toggle { min-height: 44px; white-space: normal; }
.ph-rowend { flex-wrap: wrap; }
.profile-page .clouddocs .ph-build-toggle { grid-column: 3; justify-self: start; }
.profile-page .ph-build-preview { grid-column: 1 / -1; min-width: 0; width: 100%; box-sizing: border-box; padding: 20px 0; border-top: 1px solid var(--line); }
.ph-build-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.ph-build-preview-head h3 { min-width: 0; margin: 0; font-size: 18px; font-weight: 400; overflow-wrap: anywhere; }
.ph-build-preview-head button { flex-shrink: 0; min-height: 44px; }
.ph-build-preview > .hint { overflow-wrap: anywhere; }
.ph-build-toggle:focus-visible, .ph-build-preview-head button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 767px) {
  .profile-page .clouddocs .ph-build-toggle { grid-column: 2; }
  .ph-build-preview-head { align-items: flex-start; gap: 10px; }
  .ph-build-preview-head h3 { font-size: 16px; }
}
