.guided-tour { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: hidden; }
.guided-tour::backdrop { background: transparent; }
.guided-tour-spotlight { position: fixed; border: 2px solid var(--green); border-radius: 12px; box-shadow: 0 0 0 100vmax color-mix(in srgb,var(--shadow-color) 61.2%,transparent); pointer-events: none; }
.guided-tour-panel { --button-face: var(--green); --button-hover: color-mix(in srgb, var(--green) 85%, var(--ink)); position: fixed; width: min(380px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: 16px; background: var(--paper); box-shadow: 0 16px 50px color-mix(in srgb,var(--shadow-color) 25.1%,transparent); }
.guided-tour-panel header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guided-tour-kicker { display: inline-flex; gap: 8px; align-items: center; color: var(--green); font-size: var(--text-small); font-weight: 700; }
.guided-tour-close { display: grid; place-items: center; width: 44px; height: 44px; margin: -12px -12px -8px 0; padding: 0; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.guided-tour-close:hover { background: var(--sage); }
.guided-tour-close i { font-size: 22px; }
.guided-tour-reassurance { color: var(--muted); font-size: var(--text-small); line-height: 1.45; margin: -8px 0 14px; }
.guided-tour-counter { margin: 20px 0 8px; color: var(--muted); font-size: var(--text-small); }
.guided-tour-panel h2 { font: bold var(--text-section)/1.2 var(--font-display); margin: 0 0 12px; letter-spacing: -.02em; }
.guided-tour-description { font-size: var(--text-base); line-height: 1.6; margin: 0; }
.guided-tour-progress { display: flex; gap: 5px; margin: 20px 0; }
.guided-tour-progress span { height: 4px; flex: 1; border-radius: 2px; background: var(--line); }
.guided-tour-progress .is-done { background: var(--sage); }
.guided-tour-progress .is-current { background: var(--green); }
.guided-tour-panel footer, .guided-tour-panel footer > div { display: flex; align-items: center; gap: 8px; }
.guided-tour-panel footer { justify-content: space-between; }
.guided-tour-panel .button:disabled { opacity: .45; cursor: default; }
.guided-tour-skip, .guided-tour-try { border: 0; background: transparent; color: var(--green); min-height: 44px; padding: 8px 0; cursor: pointer; font-size: var(--text-small); }
.guided-tour-try { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; margin: -8px 0 12px; }
.guided-tour-feedback { padding: 12px 16px; background: var(--sage); border-radius: 8px; }
.guided-tour :focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.guided-tour .guided-tour-panel:focus { outline: none; }
.reader-settings .reader-guide { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--green); font-size: var(--text-small); line-height: 1.4; white-space: normal; }
html[data-focus-modality=pointer] :is([data-action="guided-tour#start"], .account-menu > summary, [data-guide-menu] > summary):focus { outline: none; }
@media(max-width: 760px) { [data-guide-launcher] { display: none !important; } }
@media(max-width: 420px) { .guided-tour-panel { padding: 18px; } .guided-tour-panel h2 { font-size: var(--text-section); } .guided-tour-description { font-size: var(--text-small); } }

body.welcome-page { padding: 0; background: var(--paper); }
:root .welcome-dialog { position: fixed; inset: 0; width: min(540px, calc(100vw - 32px)); max-width: none; height: min(900px, calc(100dvh - 32px)); max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px color-mix(in srgb,var(--shadow-color) 30%,transparent); }
:root .welcome-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(6px); }
.welcome-standalone { width: min(540px, 100%); height: 100dvh; margin: auto; }
.welcome-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; color: var(--ink); background: var(--paper); font: 400 16px/1.45 var(--font-body); }
.welcome-chat * { box-sizing: border-box; }
.welcome-chat button, .welcome-chat a { -webkit-tap-highlight-color: transparent; }
.welcome-chat-header { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 10px; }
.welcome-chat-header > .qoops-logo { flex-shrink: 0; width: 44px; height: auto; }
.welcome-chat-header > div { flex: 1; min-width: 0; }
.welcome-chat-header h1 { margin: 0; font: 700 clamp(18px, 5.5vw, 24px)/1.1 var(--font-display); letter-spacing: -.03em; }
.welcome-chat-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.welcome-chat-header > .welcome-action-form { flex-shrink: 0; max-width: 60px; }
.welcome-chat .welcome-text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 5px 4px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--muted); font: 500 14px/1.25 var(--font-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.welcome-chat-header .welcome-text-button { font-size: 13px; text-decoration: none; }
.welcome-progress { display: flex; justify-content: space-between; flex: 0 0 auto; margin: 8px 20px 12px; padding: 0; list-style: none; }
.welcome-progress li { position: relative; display: flex; align-items: center; flex: 1; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.welcome-progress li:not(:last-child)::after { content: ''; position: absolute; top: 11px; left: calc(50% + 17px); width: calc(100% - 34px); height: 1px; background: var(--line); }
.welcome-progress li > span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--muted); border-radius: 50%; }
.welcome-progress li > span > i { display: none; }
.welcome-progress .is-current { color: var(--green); font-weight: 700; }
.welcome-progress .is-current > span { border: 2px solid var(--green); background: var(--green); box-shadow: inset 0 0 0 3px var(--paper); }
.welcome-progress .is-done > span { border-color: var(--green); background: var(--green); color:var(--green-ink); }
.welcome-progress .is-done > span > i { display: block; font-size: 12px; }
.welcome-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 24px; scrollbar-width: thin; }
.welcome-bubble { margin: 0; padding: 14px 16px; overflow-wrap: anywhere; }
.welcome-bubble--incoming { border-radius: 20px 20px 20px 4px; background: var(--surface-soft); }
.welcome-bubble--incoming h2 { margin: 0 0 14px; font: 700 25px/1.2 var(--font-display); }
.welcome-bubble p { margin: 10px 0 0; }
.welcome-bubble p:first-child { margin-top: 0; }
.welcome-recent { display: flex; flex-direction: column; align-items: flex-end; margin: 4px 0 10px; }
.welcome-recent .welcome-action-form { margin-right: 4px; }
.welcome-bubble--outgoing { max-width: 90%; border-radius: 20px 20px 4px 20px; background: var(--green); color:var(--green-ink); }
.welcome-confirmation { max-width: 90%; margin-bottom: 16px; font-size: 15px; }
.welcome-question { display: flex; align-items: center; gap: 10px; margin: 8px 0 22px; }
.welcome-question > img { width: 104px; height: 104px; object-fit: contain; flex-shrink: 0; image-rendering: pixelated; }
.welcome-question > h2 { flex: 1; min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); background: var(--surface); font: 700 19px/1.2 var(--font-display); }
.welcome-question--scene { flex-direction: column; align-items: stretch; gap: 14px; }
.welcome-question--scene > img { align-self: center; width: min(100%, 260px); height: auto; border-radius: 16px; }
.welcome-question--scene > h2 { flex: none; }
.welcome-chat .welcome-choice { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 80px; margin: 0; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: none; text-align: left; cursor: pointer; }
.welcome-answers { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.welcome-choice > i:first-child { width: 32px; flex-shrink: 0; color: var(--green); font-size: 28px; text-align: center; }
.welcome-choice > i:last-child { margin-left: auto; color: var(--muted); font-size: 15px; }
.welcome-choice[aria-pressed="true"] { border-color: var(--green); background: var(--sage); }
.welcome-choice > span { flex: 1; min-width: 0; }
.welcome-choice strong { display: block; font: 700 15px/1.2 var(--font-display); }
.welcome-choice small { display: block; margin-top: 5px; color: var(--muted); font: 400 13px/1.4 var(--font-body); }
.welcome-chat .welcome-primary, .welcome-chat .welcome-secondary { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 48px; margin: 8px 0; padding: 12px 18px; border: 1px solid var(--green); border-radius: 12px; background: var(--green); box-shadow: none; color:var(--green-ink); font: 700 16px/1.3 var(--font-ui); text-decoration: none; cursor: pointer; }
.welcome-chat .welcome-secondary { border-color: var(--sage); background: var(--sage); color: var(--green); }
.welcome-chat .welcome-secondary:active { background: color-mix(in srgb, var(--sage) 85%, var(--green)); }
.welcome-start-actions { margin-top: 24px; text-align: center; }
.welcome-intro-art { margin: 20px 0; text-align: center; }
.welcome-intro-art img { object-fit: contain; image-rendering: pixelated; }
.welcome-skip-question { text-align: center; margin-top: 10px; }
.welcome-chat-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 12px; padding: 16px 12px max(12px, env(safe-area-inset-bottom)); }
.welcome-chat-footer p { flex: 1; min-width: 0; margin: 0; text-align: center; color: var(--muted); font-size: 12px; }
.welcome-chat-footer strong { font-weight: 500; }
.welcome-chat-footer img { flex-shrink: 0; pointer-events: none; object-fit: contain; image-rendering: pixelated; }
.welcome-tastes { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; border: 0; }
.welcome-tastes label { position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font: 500 14px/1.35 var(--font-body); cursor: pointer; }
.welcome-tastes label:has(:checked) { background: var(--sage); border-color: var(--green); }
.welcome-tastes input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.welcome-choice-help { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.welcome-errors { margin: 0 0 12px; padding: 12px; border: 1px solid var(--error-border); border-radius: 12px; color: var(--error); background: var(--error-bg); }
.welcome-errors[hidden], .welcome-chat [hidden] { display: none; }
.welcome-chat [data-welcome-chat-target="question"]:focus { outline: none; }
.welcome-chat :focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.welcome-chat [disabled] { cursor: wait; opacity: .65; }
.welcome-noscript { position: fixed; inset: auto 16px 12px; z-index: 1000; text-align: center; }
@media (hover: hover) {
    .welcome-chat .welcome-choice:hover { background: var(--sage); border-color: var(--green); }
    .welcome-chat .welcome-secondary:hover { background: color-mix(in srgb, var(--sage) 85%, var(--green)); }
}
@media (prefers-reduced-motion: no-preference) {
    .welcome-scroll { animation: welcome-message-in 160ms ease-out; }
    .welcome-choice { transition: background-color 120ms, border-color 120ms, transform 120ms; }
    .welcome-choice:active { transform: scale(.985); }
    @keyframes welcome-message-in { from { opacity: 0; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
}
@media (max-width: 600px) { :root .welcome-dialog { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; } }
@media (max-width: 350px) { .welcome-chat-header { gap: 8px; padding-inline: 12px; } .welcome-chat-header > .qoops-logo { width: 34px; height: auto; } .welcome-chat-header p { font-size: 11px; } .welcome-question:not(.welcome-question--scene) > img { width: 80px; height: 80px; } .welcome-question > h2 { font-size: 19px; } .welcome-chat .welcome-choice { gap: 10px; padding: 12px; } }

.profile-page[data-design-textsize="17"] { --text-base:1.0625rem; }
.profile-page[data-design-textsize="20"] { --text-base:1.25rem; }
.profile-page[data-design-textsize="22"] { --text-base:1.375rem; }
.profile-page[data-design-titlesize="20"] { --profile-title-size:1.25rem; }
.profile-page[data-design-titlesize="22"] { --profile-title-size:1.375rem; }
.profile-page[data-design-titlesize="28"] { --profile-title-size:1.75rem; }
.profile-page[data-design-titlesize="32"] { --profile-title-size:2rem; }
.profile-page[data-design-titlesize="36"] { --profile-title-size:2.25rem; }
.profile-page[data-design-titlesize="40"] { --profile-title-size:2.5rem; }
.profile-page[data-design-titlesize]:not([data-design-titlesize=regular]) {
    --text-section:min(var(--profile-title-size),max(1.25rem,5cqw));
    --text-card:max(1rem,calc(var(--text-section) * .84));
}
.profile-page[data-design-namesize="24"] { --profile-name-size:1.5rem; }
.profile-page[data-design-namesize="28"] { --profile-name-size:1.75rem; }
.profile-page[data-design-namesize="32"] { --profile-name-size:2rem; }
.profile-page[data-design-namesize="40"] { --profile-name-size:2.5rem; }
.profile-page[data-design-namesize="48"] { --profile-name-size:3rem; }
.profile-page[data-design-namesize="56"] { --profile-name-size:3.5rem; }
.profile-page[data-design-namesize="64"] { --profile-name-size:4rem; }
.profile-page[data-design-namesize="72"] { --profile-name-size:4.5rem; }
.profile-page[data-design-namesize]:not([data-design-namesize=regular]) .profile-name > :is(h1,h2) {
    font-size:min(var(--profile-name-size),max(1.5rem,8cqw));
    line-height:1.2;
}
.profile-page[data-design-lineheight=relaxed] { --profile-leading:1.75; }
.profile-page[data-design-lineheight=airy] { --profile-leading:2; }
.profile-page[data-design-lineheight]:not([data-design-lineheight=normal]) :is(.preserve-lines,.module-caption,.profile-summary,.profile-bio p) { line-height:var(--profile-leading); }
.profile-page[data-design-textalign=center] :is(.preserve-lines,.module-caption,.profile-summary) { text-align:center; }
.profile-page[data-design-textalign=justify] :is(.preserve-lines,.module-caption,.profile-summary) { text-align:justify; hyphens:auto; }
.profile-page[data-design-titlealign=center] :is(.module-heading-copy,.profile-section-heading h1,.profile-section-heading h2,.profile-bio h2,.profile-divider h2) { text-align:center; }
.profile-page[data-design-titlealign=center] .profile-section-heading :is(h1,h2) { justify-content:center; }
.profile-page :is(.preserve-lines,.module-caption,.profile-summary,.profile-name) { overflow-wrap:anywhere; }
.profile-page[data-design-sidewidth=slim] { --profile-side-ratio:.6fr; --profile-single-side-ratio:.7fr; }
.profile-page[data-design-sidewidth=generous] { --profile-side-ratio:1.1fr; --profile-single-side-ratio:1.3fr; }
.profile-page[data-design-cardpadding=compact] { --profile-block-padding:10px; }
.profile-page[data-design-cardpadding=generous] { --profile-block-padding:24px; }
/* Custom spacing belongs to journal modules; standard tabs keep their shared inset. */
.profile-page[data-design-cardpadding]:not([data-design-cardpadding=normal]) :is(.module-content,.module-heading) { padding:var(--profile-block-padding); }
@container profile (max-width:680px) {
    .profile-page[data-design-textalign=justify] :is(.preserve-lines,.module-caption,.profile-summary) { text-align:left; }
    .profile-page[data-design-cardpadding=generous] :is(.module-content,.module-heading) { padding:18px; }
}

.profile-scenery { container:scenery / inline-size; --profile-content-max:1320px; --profile-rail-inset:0px; }
.profile-scenery[data-design-width=narrow] { --profile-content-max:880px; }
.profile-scenery[data-design-width=balanced] { --profile-content-max:1120px; }
.profile-decor {
    position:absolute;
    top:0;
    bottom:0;
    width:max(0px,calc((100% - var(--profile-content-max) - 2 * var(--profile-rail-inset)) / 2));
    background-repeat:no-repeat;
    background-size:contain;
    pointer-events:none;
}
.profile-decor--left { left:var(--profile-rail-inset); background-image:var(--profile-decor-left-image,none); background-position:left top; }
.profile-decor--right { right:var(--profile-rail-inset); background-image:var(--profile-decor-right-image,none); background-position:right top; }
[data-design-decorposition=center] > .profile-decor { background-position-y:center; }
[data-design-decorposition=bottom] > .profile-decor { background-position-y:bottom; }
[data-design-decorsize=fill] > .profile-decor { background-size:cover; }
[data-design-decorsize=original] > .profile-decor { background-size:auto; }
[data-design-decormode=frame] > .profile-decor--left { background-position-x:right; }
[data-design-decormode=frame] > .profile-decor--right { background-position-x:left; }
.has-social-rails .profile-wallpaper { --profile-rail-inset:72px; }
.profile-wallpaper > .profile-decor { top:var(--header-height); }
.profile-scenery > .profile-page { z-index:1; }
.studio-stage[data-device=mobile] > .profile-scenery { width:390px; max-width:100%; margin-inline:auto; }
.studio-stage[data-device=desktop] > .profile-scenery > .profile-page { margin-inline:auto; }
@container scenery (max-width:760px) {
    .profile-decor { display:none; }
    [data-design-decormobile=background] > .profile-decor { display:block; width:50%; left:0; right:auto; background-size:cover; }
    [data-design-decormobile=background] > .profile-decor--right { left:auto; right:0; }
}
@media (max-width:760px) { .has-social-rails .profile-wallpaper { --profile-rail-inset:0px; } }
@media (forced-colors:active) { .profile-decor { display:none !important; } }

.profile-page {
    --profile-control-border: color-mix(in srgb, var(--ink) 60%, var(--surface));
    --profile-control-background: color-mix(in srgb, var(--ink) 6%, var(--surface));
    --profile-control-hover: color-mix(in srgb, var(--ink) 12%, var(--surface));
    --profile-section-inset: clamp(16px, 3cqw, 24px);
}

.profile-page .profile-section-heading,
.profile-page .profile-section-content { padding: var(--profile-section-inset); }
.profile-page .profile-section-heading { gap: 12px; }
.profile-page .profile-section-heading > div { min-width: 0; }
.profile-page .profile-section-heading h2 { flex-wrap: wrap; }
html[data-focus-modality=pointer] .profile-page #profile-relations:focus { outline: none; }
.profile-page .profile-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--profile-control-background);
    color: var(--ink);
    font: 600 var(--text-small)/1.2 var(--font-ui);
}

.profile-page .profile-navigation-carousel { border-color: var(--profile-control-border); }
.profile-page .profile-counts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; }
.profile-page .profile-counts > span { margin: 0; }
.profile-page .profile-counts a { display: inline-flex; align-items: center; min-height: 36px; padding-inline: 4px; text-decoration: underline; text-underline-offset: 3px; }
.profile-page .profile-actions { gap: 8px; align-items: stretch; }
.profile-page .profile-actions > form { margin: 0; min-width: 0; }
.profile-page .profile-actions .button { white-space: normal; }
.profile-page .profile-actions > .icon-button,
.profile-page :is(.profile-actions, .profile-filters, .profile-section-heading, .profile-empty-state) .button--outline {
    background: var(--profile-control-background);
    color: var(--ink);
    border-color: var(--profile-control-border);
    box-shadow: none;
}
.profile-page .profile-actions > .icon-button:hover,
.profile-page :is(.profile-actions, .profile-filters, .profile-section-heading, .profile-empty-state) .button--outline:hover {
    background: var(--profile-control-hover);
    border-color: var(--ink);
    color: var(--ink);
}

.profile-page .profile-section > .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    margin: 0;
    padding: 4px var(--profile-section-inset) 0;
    border-bottom: 1px solid var(--profile-control-border);
    scrollbar-width: thin;
}
.profile-page .profile-section > .tabs a { flex-shrink: 0; min-height: 44px; padding: 10px 12px; white-space: nowrap; }
.profile-page .profile-section > .tabs a[aria-current=page] { background: transparent; border-radius: 0; }
.profile-page .profile-filters {
    --field-background: var(--profile-control-background);
    --field-ink: var(--ink);
    --field-border: var(--profile-control-border);
    --field-hover: var(--ink);
    --field-focus: var(--ink);
    --field-ring: color-mix(in srgb, var(--ink) 16%, transparent);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin: 0;
    padding: 16px var(--profile-section-inset) 0;
    align-items: end;
}
.profile-page .profile-filters:has(label:nth-of-type(2)) { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; }
.profile-page .profile-filters label { min-width: 0; margin: 0; }
.profile-page .profile-filters :is(input:not([type=hidden]), select) { min-width: 0; }
.profile-page .profile-search-submit { margin: 0; white-space: nowrap; }

.profile-page .people-grid { gap: 12px; }
.profile-page .person-card { min-width: 0; border-color: var(--profile-control-border); }
.profile-page .person-card--link { padding: 0; }
.person-card-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 16px; border-radius: inherit; color: inherit; text-decoration: none; }
.person-card-link:hover { background: var(--profile-control-background); }
.person-card-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.person-card-link .person-card-identity { min-width: 0; }
.person-card-identity > span { min-width: 0; overflow-wrap: anywhere; }
.person-card-link .avatar { width: 48px; height: 48px; flex-shrink: 0; }
.person-card-cta { display: block; margin-top: 5px; font-size: var(--text-small); text-decoration: underline; text-underline-offset: 3px; }
.person-card-bio { grid-column: 1 / -1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); font-size: var(--text-base); line-height: 1.5; }

.profile-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 24px 16px;
    border: 1px dashed var(--profile-control-border);
    border-radius: 12px;
    background: var(--profile-control-background);
    text-align: center;
    color: var(--ink);
}
.profile-empty-state > i { font-size: var(--text-section); }
.profile-empty-state p { margin: 0; max-width: 36ch; line-height: 1.5; }
.profile-empty-state .button { max-width: 100%; white-space: normal; }
.profile-page .article-card { min-width: 0; margin: 0; border: 1px solid var(--profile-control-border); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: none; }
.profile-page .article-card:hover { border-color: var(--ink); }
.profile-page .article-card > div { padding: 16px; }
.profile-page .article-card h2 { margin: 10px 0; font-size: var(--text-section); overflow-wrap: anywhere; }
.profile-page .article-card p { margin: 0 0 12px; }
.profile-page :is(.album-card, .group-card) { border-color: var(--profile-control-border); }
.profile-page :is(.album-card, .group-card):hover { border-color: var(--ink); }
.profile-page .album-cover { background: var(--profile-control-background); }

@container profile (max-width: 800px) {
    .profile-page .profile-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 540px); justify-self: center; padding-top: 12px; border-top: 1px solid var(--profile-control-border); }
    .profile-page .profile-actions .button { width: 100%; height: 100%; }
    .profile-page .profile-actions > .friendship-response { grid-column: 1 / -1; }
    .profile-page .profile-actions--owner { grid-template-columns: minmax(0, 1fr); }
    .profile-page .profile-actions--owner > .icon-button { justify-self: center; width: 44px; }
}

@container profile (max-width: 680px) {
    .profile-page .profile-actions {
        border-top-color: color-mix(in srgb, var(--ink) 16%, var(--surface));
    }
    .profile-page .profile-actions .button--outline {
        background: transparent;
        border-color: color-mix(in srgb, var(--ink) 40%, var(--surface));
    }
    .profile-page .profile-actions .button--outline:is(:hover, :focus-visible) {
        background: var(--profile-control-background);
    }
}

@container profile (max-width: 680px) {
    .profile-page .profile-filters,
    .profile-page .profile-filters:has(label:nth-of-type(2)) { grid-template-columns: minmax(0, 1fr) 50px; gap: 10px; }
    .profile-page .profile-filters:has(label:nth-of-type(2)) label:first-of-type { grid-column: 1 / -1; }
    .profile-page .profile-search-submit { width: 50px; padding-inline: 0; }
    .profile-page .profile-search-submit > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .profile-page .people-grid { grid-template-columns: minmax(0, 1fr); }
}

.profile-page .profile-section--about {
    container: profile-about / inline-size;
}

/* The About tab and its form keep the same inset regardless of the journal's design. */
.profile-page .profile-section.profile-section--about > :is(.profile-section-heading, .profile-section-content) {
    padding: 24px;
}

.profile-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 32px;
}

.about-main {
    display: grid;
    min-width: 0;
    gap: 24px;
}

.about-intro h3 {
    margin: 0 0 16px;
    font-size: var(--text-card);
}

.about-intro > .preserve-lines {
    max-width: 65ch;
    margin: 0;
    line-height: 1.75;
}

.about-placeholder {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--muted);
}

.about-placeholder > i {
    flex-shrink: 0;
    font-size: 28px;
    color: var(--green);
}

.about-placeholder p {
    margin: 0;
    line-height: 1.6;
}

.about-member-since {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 16px 0 0;
    font-size: var(--text-small);
    color: var(--muted);
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    align-items: start;
    gap: 24px;
}

.about-detail {
    min-width: 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.about-detail h3 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 10px;
    font-size: var(--text-card);
}

.about-detail h3 > i { color: var(--green); flex-shrink: 0; }
.about-detail p { margin: 0; line-height: 1.65; }
.about-detail--website { grid-column: 1 / -1; }
.about-detail a { overflow-wrap: anywhere; }
.about-detail a > i { margin-left: 8px; }
.about-completion-note { margin: 0; color: var(--muted); font-size: var(--text-small); line-height: 1.6; }
.about-aura { min-width: 0; }

.aura-card {
    margin: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(120deg, var(--surface), var(--info-bg));
    color: var(--ink);
}

.aura-card-heading {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.aura-card-heading > img { width: 48px; height: 48px; }
.aura-card-heading > div { min-width: 0; }
.aura-card .eyebrow { margin: 0 0 3px; color: var(--green); font-size: 11px; letter-spacing: .06em; }
.aura-card h3 { margin: 0; font-size: 1.25rem; }
.aura-score { display: flex; flex-direction: column; align-items: end; gap: 3px; color: var(--green); white-space: nowrap; }
.aura-score strong { font: 700 1.75rem/1 var(--font-ui); }
.aura-score span { font-size: var(--text-small); }
.aura-card meter { display: block; width: 100%; height: 10px; margin: 20px 0 14px; border: 0; border-radius: 20px; background: var(--track); }
.aura-card meter::-webkit-meter-bar { background: var(--track); border: 0; border-radius: 20px; }
.aura-card meter::-webkit-meter-optimum-value { background: var(--primary-text); border-radius: 20px; }
.aura-card meter::-moz-meter-bar { background: var(--primary-text); border-radius: 20px; }
.aura-recovery { margin: 0 0 16px; color: var(--green); font-size: var(--text-base); line-height: 1.5; }
.aura-explanation { margin: 12px 0 0; font-size: var(--text-base); line-height: 1.6; }
.aura-private { margin: 12px 0 0; font-size: var(--text-small); color: var(--muted); }
.aura-help { padding-top: 12px; border-top: 1px solid var(--line); }
.aura-help summary, .aura-history summary { cursor: pointer; font-weight: 600; font-size: var(--text-small); }
.aura-help summary:focus-visible, .aura-history summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 3px; }
.aura-history { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.aura-history article { padding-top: 14px; font-size: var(--text-base); }
.aura-history article > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.aura-history p { margin: 6px 0 0; }

@container profile-about (max-width: 640px) {
    .profile-page .profile-section.profile-section--about > :is(.profile-section-heading, .profile-section-content) { padding: 16px; }
    .profile-about-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .about-details { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .about-placeholder { padding: 16px; }
}


.profile-theme-ocean { --paper:#dcecf0; --surface:#f4fcfc; --surface-soft:#dceff1; --line:#a8cbd0; --ink:#143c47; --muted:#42636c; --primary:#1c6878; --primary-hover:#165261; --green:#1c6878; --sage:#dceff1; }
.profile-theme-sunset { --paper:#f6ddd4; --surface:#fff8ee; --surface-soft:#fce6da; --line:#d6ac97; --ink:#492724; --muted:#76564d; --primary:#a7442f; --primary-hover:#883722; --green:#764534; --sage:#fce6da; }
.profile-theme-gothic { --paper:#171621; --surface:#25212e; --surface-soft:#373044; --line:#766487; --ink:#faf0fc; --muted:#d2bfdc; --primary:#eeb9d8; --primary-hover:#f4d0e5; --primary-ink:#333333; --primary-hover-ink:#333333; --green:#d9c4ec; --green-ink:#333333; --sage:#40354e; --surface-white:#25212e; --peach:#49374b; }
.profile-theme-amber { --paper:#dfcfa8; --surface:#fbf3dc; --surface-soft:#ebddba; --line:#a8976e; --ink:#3f3224; --muted:#6d5b3e; --primary:#855421; --primary-hover:#674019; --green:#655333; --sage:#ebddba; }

.profile-scenery {
    position:relative;
    isolation:isolate;
    min-width:0;
    background-color:var(--paper);
    background-repeat:no-repeat;
    --decor-ink:color-mix(in srgb,var(--primary) 14%,transparent);
    --primary-text:var(--primary-hover);
}
.profile-page {
    --primary-text:var(--primary-hover);
    --field-background:var(--surface);
    --field-ink:var(--ink);
    --field-border:var(--line-strong);
    --field-hover:var(--green);
    --field-focus:var(--green);
    --field-ring:color-mix(in srgb,var(--green) 16%,transparent);
}
.profile-page .avatar--initial { color:var(--text-inverse); }
.profile-scenery::before, .habillage-miniature::before {
    content:'';
    position:absolute;
    inset:0;
    background-image:var(--decor-pattern,none);
    background-size:var(--decor-size,auto);
    pointer-events:none;
    z-index:-1;
}
[data-design-pattern=dots] { --decor-pattern:radial-gradient(var(--decor-ink) 1.5px,transparent 2px); --decor-size:20px 20px; }
[data-design-pattern=grid] { --decor-pattern:linear-gradient(var(--decor-ink) 1px,transparent 1px),linear-gradient(90deg,var(--decor-ink) 1px,transparent 1px); --decor-size:24px 24px; }
[data-design-pattern=stars] { --decor-pattern:radial-gradient(ellipse 2px 8px at 20px 20px,var(--decor-ink) 98%,transparent),radial-gradient(ellipse 8px 2px at 20px 20px,var(--decor-ink) 98%,transparent),radial-gradient(circle at 48px 50px,var(--decor-ink) 1px,transparent 2px); --decor-size:70px 70px; }
[data-design-pattern=petals] { --decor-pattern:radial-gradient(ellipse 5px 9px at 15px 15px,var(--decor-ink) 98%,transparent),radial-gradient(ellipse 9px 5px at 28px 24px,var(--decor-ink) 98%,transparent); --decor-size:64px 64px; }
.profile-scenery > .profile-page { position:relative; background:transparent; }
.profile-public { position:relative; background:transparent; }
.profile-wallpaper { position:fixed; inset:0; z-index:-1; pointer-events:none; }
.profile-wallpaper[data-design-backgroundscroll=scroll] { position:absolute; }
.profile-scenery-content { display:flex; flex-direction:column; min-height:calc(100dvh - var(--header-height)); background:transparent; }
.profile-scenery-content::before { display:none; }
.profile-scenery-content > .profile-page { width:100%; flex:1; }
.profile-scenery-content > .site-footer { color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); margin-bottom:24px; }
.profile-scenery-content > .site-footer a { color:inherit; }
.profile-scenery-content > .site-footer a:focus-visible { outline:2px solid var(--primary); outline-offset:4px; }
.profile-page[data-design-width=narrow] { max-width:calc(var(--page-width-narrow) + 2 * var(--page-gutter)); }
/* Previously saved balanced profiles use the shared wide frame. */
.profile-page[data-design-width=balanced], .profile-page[data-design-width=wide] { max-width:var(--page-width-wide); }
.profile-page[data-design-corners=square] { --profile-card-radius:0px; }
.profile-page[data-design-corners=soft] { --profile-card-radius:var(--radius); }
.profile-page[data-design-corners=round] { --profile-card-radius:28px; }
.profile-page[data-design-border=none] { --profile-card-border:0px solid transparent; }
.profile-page[data-design-border=thin] { --profile-card-border:1px solid var(--line); }
.profile-page[data-design-border=double] { --profile-card-border:4px double var(--line); }
.profile-page[data-design-border=dashed] { --profile-card-border:1px dashed var(--line-strong,var(--line)); }
.profile-page[data-design-shadow=none] { --profile-card-shadow:none; }
.profile-page[data-design-shadow=soft] { --profile-card-shadow:0 8px 24px color-mix(in srgb,var(--ink) 12%,transparent); }
.profile-page[data-design-shadow=offset] { --profile-card-shadow:5px 5px 0 color-mix(in srgb,var(--ink) 22%,transparent); }
.profile-page :is(.profile-header,.profile-main,.profile-module,.profile-section),
.profile-page .builder-block {
    border:var(--profile-card-border,1px solid var(--line));
    border-radius:var(--profile-card-radius,var(--radius));
    box-shadow:var(--profile-card-shadow,none);
}
.profile-page[data-design-corners=soft] .profile-header { border-radius:0 0 var(--radius-small) var(--radius-small); }
.profile-page .builder-block > .profile-module { border:0; box-shadow:none; border-radius:0 0 var(--profile-card-radius,var(--radius)) var(--profile-card-radius,var(--radius)); }
.profile-page .builder-block-tools { border-radius:var(--profile-card-radius,var(--radius)) var(--profile-card-radius,var(--radius)) 0 0; }
.profile-page[data-design-spacing=compact] :is(.profile-layout,.profile-zone) { gap:10px; }
.profile-page[data-design-spacing=airy] :is(.profile-layout,.profile-zone) { gap:24px; }
.profile-page[data-design-headingstyle=plain] :is(.module-heading,.profile-section-heading) { background:var(--surface); border-bottom:0; }
.profile-page[data-design-headingstyle=accent] :is(.module-heading,.profile-section-heading) { background:var(--surface); border-bottom:0; border-left:5px solid var(--primary); }
.profile-page[data-design-headingstyle=accent] .module-heading h2 { color:var(--ink); }
.profile-page[data-design-coverheight=compact] .profile-banner,
.profile-page[data-design-coverheight=compact] .profile-header > .qoops-cover { height:88px; min-height:0; }
.profile-page[data-design-coverheight=tall] .profile-banner,
.profile-page[data-design-coverheight=tall] .profile-header > .qoops-cover { height:clamp(190px,28cqw,340px); }
.profile-page[data-design-coverposition=top] :is(.profile-banner,.profile-banner > img) { object-position:center top; }
.profile-page[data-design-coverposition=bottom] :is(.profile-banner,.profile-banner > img) { object-position:center bottom; }
.profile-page[data-design-coverposition=center] :is(.profile-banner,.profile-banner > img) { object-position:center; }
.profile-page[data-design-portrait=soft] .profile-portrait,
.profile-page[data-design-portrait=soft] .profile-portrait > .avatar:not([data-pixel-art]) { border-radius:20px; }
.profile-page[data-design-portrait=square] .profile-portrait,
.profile-page[data-design-portrait=square] .profile-portrait > .avatar:not([data-pixel-art]) { border-radius:0; }
.profile-page[data-design-header=left] .profile-header .profile-identity--social { grid-template-columns:96px minmax(0,1fr) auto; gap:10px 20px; padding:0 24px 24px; }
.profile-page[data-design-header=left] .profile-portrait { grid-column:1; grid-row:1/4; justify-self:start; }
.profile-page[data-design-header=left] .profile-name { grid-column:2; grid-row:1; text-align:left; padding-top:16px; }
.profile-page[data-design-header=left] .profile-bio { grid-column:2; grid-row:2; text-align:left; justify-self:start; }
.profile-page[data-design-header=left] .profile-social-links { grid-column:2; grid-row:3; justify-content:flex-start; }
.profile-page[data-design-header=left] .profile-actions { grid-column:3; grid-row:1/4; justify-content:flex-end; }
.profile-page[data-design-textsize=large] { --text-base:1.125rem; }
.profile-page[data-design-textsize=large] :is(.preserve-lines,.module-caption,.profile-summary) { line-height:1.65; }
.profile-theme-gothic :is(.badge,.book-cover--text) { color:var(--ink); background:var(--surface-soft); }
.profile-page:is(.profile-theme-midnight,.profile-theme-gothic) .profile-module .module-heading { --module-surface:var(--surface-soft); }

@container profile (max-width:680px) {
    .profile-page[data-design-header=left] .profile-header .profile-identity--social { grid-template-columns:88px minmax(0,1fr); gap:12px; padding-inline:14px; }
    .profile-page[data-design-header=left] .profile-portrait { grid-row:1; width:88px; height:88px; }
    .profile-page[data-design-header=left] .profile-portrait > .avatar:not([data-pixel-art]) { width:78px; height:78px; }
    .profile-page[data-design-header=left] .profile-name { grid-row:1; padding-top:12px; }
    .profile-page[data-design-header=left] .profile-bio { grid-column:1/-1; grid-row:2; }
    .profile-page[data-design-header=left] .profile-social-links { grid-column:1/-1; grid-row:3; }
    .profile-page[data-design-header=left] .profile-actions { grid-column:1/-1; grid-row:4; justify-content:flex-start; }
    .profile-page[data-design-spacing=airy] :is(.profile-layout,.profile-zone) { gap:18px; }
    .profile-page[data-design-corners=round] { --profile-card-radius:20px; }
}
@media (prefers-contrast:more), (forced-colors:active) {
    .profile-scenery::before { display:none; }
    .profile-page :is(.profile-header,.profile-main,.profile-module,.profile-section) { border:1px solid currentColor; box-shadow:none; }
}

/* Saved custom colors own profile actions as well as card surfaces. */
.profile-page.has-custom-colors { --green:var(--primary-text); --green-ink:var(--primary-ink); --sage:var(--surface-soft); --peach:var(--surface-soft); }

