* { box-sizing: border-box; }
html { scrollbar-gutter: stable both-edges; overscroll-behavior-y: contain; background: #fff; }
html:has(body[data-route="write"]) { overscroll-behavior-y: none; }
:root { color-scheme: light; --ink: #161517; --muted: #5e5b64; --line: #e8e6eb; --button-bg: #e4e4e7; --button-line: #c8c5cd;
  --handle-size: .85rem; --button-height: 36px; --button-radius: 10px; --mobile-top-height: 57px; --bar-opacity: 65%; --bar-blur: 8px;
  --pull-return: 240ms cubic-bezier(.22,.8,.35,1);
  --accent: #777780; --danger: #a41527; --bg: #fff; font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
button:disabled { opacity: .58; cursor: default; }
:is(:focus, :focus-visible) { outline: none; }
* { -webkit-tap-highlight-color: transparent; }
.top { display: none; position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); transform: translateY(calc(-1 * var(--header-offset, 0px))); }
.top[data-revealing] { transition: transform 180ms cubic-bezier(.22,.8,.35,1); }
.top:has(:focus-visible) { transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .top[data-revealing] { transition: none; } }
.top-inner { position: relative; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 17px; }
.brand { display: block; width: min(220px, 100%); }
.brand[hidden] { display: none; }
.brand img { display: block; width: 100%; height: auto; }
.account-toggle { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); }
.account-toggle[hidden] { display: none; }
.account-toggle .avatar { --avatar-size: 31px; --avatar-border: 2px; }
#account-menu { position: fixed; inset: 0 0 0 auto; margin: 0; border: 0; padding: 0; width: min(320px, 86vw); max-width: none; height: 100%; height: 100dvh; max-height: none; color: var(--ink); background: white; }
#account-menu[open] { animation: drawer-enter 180ms ease-out both; }
#account-menu[open]::backdrop { background: #1d182466; animation: backdrop-enter 180ms ease-out both; }
#account-menu[open][data-closing] { animation-name: drawer-exit; animation-timing-function: ease-in; }
#account-menu[open][data-closing]::backdrop { animation-name: backdrop-exit; animation-timing-function: ease-in; }
@keyframes drawer-enter { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawer-exit { from { transform: none; } to { transform: translateX(100%); } }
@keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-exit { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #account-menu[open], #account-menu[open]::backdrop { animation-duration: 0ms; }
}
.drawer-inner { min-height: 100%; padding: 56px 20px 24px; }
.drawer-close { position: absolute; right: 15px; top: 12px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); width: 40px; height: 40px; font-size: 1.65rem; }
.drawer-links > * { padding: 14px 3px; min-height: 48px; display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); color: var(--ink); font-weight: 700; text-align: left; }
.handle-field { position: relative; }
.handle-field > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.handle-field input { padding-left: 34px; }
.shell { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 206px minmax(0, 650px); gap: 36px; padding: 0 24px 48px; --content-inset: 17px; }
.shell:has(.themed-profile) { padding-block-end: 0; }
nav { display: flex; flex-direction: column; align-self: start; gap: 6px; position: sticky; top: 0;
  max-height: 100dvh; overflow-y: auto; }
nav > a, .sidebar-account > * { display: flex; align-items: center; gap: 11px; padding: 12px; border: 0; background: none;
  border-radius: 9px; color: var(--muted); font-weight: 700; width: 100%; text-align: left; }
nav a[aria-current=page] { color: var(--ink); }
.sidebar-top .brand { margin: 8px 0 20px; }
.sidebar-profile { display: grid; justify-items: center; gap: 8px; text-align: center; }
.sidebar-profile .identity { font-size: .85rem; }
.sidebar-profile .subtle { font-size: .78rem; }
.sidebar-counts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin-block: 12px 16px; font-size: .8rem; }
.sidebar-counts a { display: inline-flex; gap: 4px; padding-block: 5px; }
.sidebar-counts a:hover, .sidebar-counts a:focus-visible { text-decoration: underline; }
.sidebar-profile .avatar { --avatar-size: 64px; --avatar-border: 3px; }
.sidebar-profile .identity { min-width: 0; }
.sidebar-account { display: grid; gap: 6px; }
.icon { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; font-size: 1.2rem; line-height: 1; }
.main-column, main { min-width: 0; }
main { translate: 0 var(--pull-offset, 0px); }
body.pull-settling main { transition: translate var(--pull-return); }
#desktop-back { position: sticky; top: 0; z-index: 3; pointer-events: none; }
body[data-profile-cover] #desktop-back { margin-bottom: -44px; }
.desktop-back-bar { display: flex; align-items: center; padding-inline: 5px; background: rgb(255 255 255 / var(--bar-opacity));
  -webkit-backdrop-filter: blur(var(--bar-blur)); backdrop-filter: blur(var(--bar-blur)); color: #161517; pointer-events: none; }
body[data-profile-cover] :is(.top, .desktop-back-bar) { background: rgb(255 255 255 / calc(var(--profile-back-progress, 0) * var(--bar-opacity)));
  -webkit-backdrop-filter: blur(calc(var(--profile-back-progress, 0) * var(--bar-blur))); backdrop-filter: blur(calc(var(--profile-back-progress, 0) * var(--bar-blur))); border-color: transparent; }
.desktop-back-bar .profile-back { pointer-events: auto; }
#pull-status { display: none; }
body.pull-settling #pull-status { transition: clip-path var(--pull-return); }
.pinwheel { display: block; width: 34px; height: 34px; }
#pull-status[data-refreshing] .pinwheel { animation: pinwheel-spin 680ms linear infinite; }
@keyframes pinwheel-spin { to { transform: rotate(360deg); } }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  body.pull-settling :is(main, #pull-status) { transition: none; }
  #pull-status[data-refreshing] .pinwheel { animation: none; }
}
h1 { margin: 0 0 20px; font-size: clamp(1.75rem, 5vw, 2.25rem); letter-spacing: -.065em; }
h2 { margin: 0; font-size: 1.22rem; letter-spacing: -.03em; }
.tabs { display: flex; border-bottom: 1px solid var(--line); gap: 16px; margin-bottom: 5px; }
.tabs a { padding: 12px 14px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 720; }
.tabs a[aria-current=page] { border-color: var(--accent); color: var(--ink); }
.post, .person { padding: 17px 0; border-bottom: 1px solid var(--line); }
.person { display: flex; align-items: center; gap: 12px; }
.identity { display: grid; gap: 3px; overflow-wrap: anywhere; }
.identity a { font-weight: 760; }
.identity small, .subtle { color: var(--muted); font-size: .875rem; }
.avatar { --avatar-size: 43px; --avatar-border: 2px; border: var(--avatar-border) solid var(--avatar-ring, var(--button-bg)); border-radius: 50%;
  width: var(--avatar-size); height: var(--avatar-size); display: block; object-fit: cover; flex: 0 0 auto; background: #d9d9d9; }
.profile-masthead { position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: clip; }
.profile-cover { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; object-fit: cover; object-position: center;
  opacity: var(--header-opacity, 50%);
  -webkit-mask-image: linear-gradient(#000 72%, transparent);
  mask-image: linear-gradient(#000 72%, transparent); }
.profile-masthead:has(.profile-cover) { aspect-ratio: 1; }
.profile-masthead:has(.profile-cover)::before { content: ""; flex: none; width: 100%; aspect-ratio: 4; max-height: 144px; }
.profile-summary { padding: 16px var(--content-inset); margin: auto 0 0; }
.profile-masthead .tabs { padding-inline: var(--content-inset); margin-bottom: 0; }
.themed-profile { color: var(--profile-text, var(--ink)); background-color: var(--profile-bg, #fff); --ink: var(--profile-text, #161517);
  --muted: color-mix(in srgb, var(--profile-text, #161517) 80%, var(--profile-bg, white));
  --line: color-mix(in srgb, var(--profile-text, #161517) 22%, var(--profile-bg, white));
  --accent: var(--profile-button, #e4e4e7); }
.themed-profile > :not(.profile-masthead) { margin-inline: var(--content-inset); }
.themed-profile { min-height: 100dvh; padding-block-end: 48px; }
.content-link, .link { color: inherit; font-weight: 750; }
.profile-avatar-button { align-self: start; border: 0; padding: 0; border-radius: 50%; background: none; }
.post-sheet-content:has(> .avatar-full) { container-type: inline-size; }
.avatar-full { display: block; width: 100%; height: auto; border: calc(100cqi / 24) solid var(--avatar-ring, var(--button-bg)); border-radius: 8px; }
.profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(12px, 4vw, 20px); }
.profile-head .avatar { --avatar-size: clamp(72px, 24vw, 96px); --avatar-border: calc(var(--avatar-size) / 24);
  border-width: round(up, calc(var(--avatar-size) / 24), 1px); }
.profile-head .avatar .icon { width: 32px; height: 32px; }
.profile-head h1 { margin: 0; font-size: 1rem; line-height: 1.35; }
.profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 286px; gap: 5px; margin-top: 8px; }
.profile-stats a { display: grid; align-content: center; min-height: 44px; font-weight: 400; line-height: 1.35; }
.profile-stats a[aria-current="page"] > span { font-weight: 750; }
.profile-stats strong { font-variant-numeric: tabular-nums; }
.profile-bio-summary { margin-top: 16px; }
.profile-bio, .profile-bio-full { margin: 0; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-bio { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.profile-bio-more { padding: 4px 0; font-weight: 700; }
.profile-actions { margin-top: 14px; }
.profile-actions .button { min-width: 116px; }
.person .button { margin-left: auto; flex: 0 0 auto; }
.post-layout { display: grid; grid-template-columns: 51px minmax(0, 1fr); align-items: start; gap: 8px; }
.post[data-open-post] { cursor: pointer; }
.post.thread-connector { position: relative; border-bottom-color: transparent; }
.thread-connector::before { content: ""; position: absolute; inset: 72px auto -13px 24px;
  width: 2px; background: var(--line); pointer-events: none; }
.composer-thread > .thread-connector::before { bottom: -8px; }
.reply-target { margin: 5px 0 0; font-size: var(--handle-size); color: var(--muted); overflow-wrap: anywhere; }
.reply-target a { color: var(--ink); }
.post-layout .avatar { --avatar-size: 51px; --avatar-border: 3px; }
.post-column { min-width: 0; }
.post-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.post-head-tools { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin: -10px -5px 0 0; color: var(--muted); }
.post-state { display: inline-flex; align-items: center; min-height: 40px; }
.post-head-tools .post-control { min-width: 30px; }
.post-author { min-width: 0; display: grid; gap: 3px; }
.post-name { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 7px; overflow-wrap: anywhere; }
.post-name a:first-child { font-weight: 760; }
.post-handle { font-size: var(--handle-size); font-weight: 400; }
.post-date, .post-name .post-handle, .quote-card .post-handle { color: var(--muted); font-size: var(--handle-size); }
.post-date { margin-top: 8px; text-align: right; }
.post-copy { width: 100%; margin: 0; padding: 0; font: 400 16px/1.55 var(--post-font, system-ui), sans-serif;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; tab-size: 4; }
.post-text { margin-top: 8px; }
.post-actions { display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; gap: 2px; margin-top: 5px; }
.post-control, .text-button { color: var(--muted); background: none; border: 0; }
.text-button { padding: 8px 4px; }
.post-control { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; min-width: 40px; padding: 6px; border-radius: 8px; }
.post-count { font-size: .84rem; font-variant-numeric: tabular-nums; }
:is(.post-control, .post-state) .icon { width: 20px; height: 20px; }
.post-control[aria-pressed=true] { color: var(--ink); }
.post-control[aria-pressed=true] .icon { fill: currentColor; }
.post-head .post-control { flex-shrink: 0; }
.quote-card { display: grid; gap: 3px; margin: 10px 0 2px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--button-radius); white-space: pre-wrap; overflow-wrap: anywhere; }
.composer-frame { padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.composer textarea.post-copy { border: 0; border-radius: 0; padding: 0; resize: none; scrollbar-width: none; }
.composer textarea.post-copy::-webkit-scrollbar { display: none; }
.composer #length { display: block; margin-top: 6px; text-align: right; }
#post-sheet { position: fixed; inset: auto 0 0; margin: 0 auto; width: min(100%, 470px); max-width: 100%;
  max-height: min(80dvh, 600px); padding: 0; border: 0; border-radius: 18px 18px 0 0; background: #fff; color: var(--ink); }
.post-sheet-content { display: grid; gap: 10px; padding: 17px 20px calc(18px + env(safe-area-inset-bottom)); }
.sheet-options { display: grid; }
.sheet-options .button { justify-content: flex-start; min-height: 48px; padding-inline: 9px; color: var(--ink); border: 0; }
.sheet-options .sheet-danger { color: var(--danger); }
.sheet-cancel { width: 100%; border-radius: 24px !important; }
#post-sheet[open] { animation: sheet-enter 180ms ease-out both; }
#post-sheet[open]::backdrop { background: #1d182466; animation: backdrop-enter 180ms ease-out both; }
#post-sheet[open][data-closing] { animation-name: sheet-exit; animation-timing-function: ease-in; }
#post-sheet[open][data-closing]::backdrop { animation-name: backdrop-exit; animation-timing-function: ease-in; }
#post-sheet[data-centered] { inset: 0; margin: auto; width: min(calc(100% - 32px), 470px, max(200px, calc(80dvh - 64px))); border-radius: 18px; }
#post-sheet[data-centered][open] { animation-name: centered-sheet-enter; }
#post-sheet[data-centered][open][data-closing] { animation-name: centered-sheet-exit; }
#account-menu, #post-sheet, #image-crop {
  background: rgb(255 255 255 / var(--bar-opacity));
  -webkit-backdrop-filter: blur(var(--bar-blur)); backdrop-filter: blur(var(--bar-blur));
}
@keyframes sheet-enter { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-exit { from { transform: none; } to { transform: translateY(100%); } }
@keyframes centered-sheet-enter { from { transform: translateY(-100dvh); } to { transform: none; } }
@keyframes centered-sheet-exit { from { transform: none; } to { transform: translateY(-100dvh); } }
@media (prefers-reduced-motion: reduce) { #post-sheet[open], #post-sheet[open]::backdrop { animation-duration: 0ms; } }
.button { display: inline-flex; align-items: center; justify-content: center; font-size: var(--handle-size); font-weight: 750; line-height: 1.25; min-height: var(--button-height); padding: 6px 15px; border-radius: var(--button-radius); background: #fff; color: var(--ink); border: 1px solid var(--button-line); }
.button.primary { background: var(--button-bg); }
.button.following { color: var(--muted); border-color: #c8c5cd; }
.button.neutral { color: var(--ink); border-color: #c8c5cd; }
.themed-profile .button { background: var(--accent); color: var(--profile-button-ink); border-color: color-mix(in srgb, var(--accent) 64%, var(--profile-button-ink)); }
.form { max-width: 440px; }
form { display: grid; gap: 13px; }
label { font-weight: 700; }
input, textarea { display: block; width: 100%; border: 1px solid #c8c5cd; background: #fff; color: var(--ink); border-radius: 8px; min-height: 47px; padding: 11px 13px; }
textarea { min-height: 175px; resize: vertical; line-height: 1.55; }
.mention-field { min-width: 0; }
.mention-options { max-height: 188px; overflow-y: auto; overscroll-behavior: contain; position: relative;
  margin-top: 5px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mention-options button { display: flex; align-items: center; gap: 9px; padding: 7px 9px; width: 100%;
  border: 0; background: none; color: var(--ink); text-align: left; }
.mention-options button + button { border-top: 1px solid var(--line); }
.mention-options .avatar { --avatar-size: 32px; }
.mention-options [aria-selected=true] strong { text-decoration: underline; text-underline-offset: 3px; }
.code { text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .4em; font-size: 1.35rem; }
.empty { color: var(--muted); margin: 26px 0; line-height: 1.65; }
.error { color: #a41527; margin: 0; line-height: 1.5; }
.meta { color: var(--muted); margin: 0 0 14px; line-height: 1.55; }
.dim { color: var(--muted); font-size: .875rem; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 15px 0; }
#notice:empty { display: none; }
#notice { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 5; width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 8px; color: #fff; background: #211f23; }
@media (max-width: 760px) {
  .top { display: block; background: rgb(255 255 255 / var(--bar-opacity));
    -webkit-backdrop-filter: blur(var(--bar-blur)); backdrop-filter: blur(var(--bar-blur)); }
  body[data-pull-refresh] #pull-status { position: fixed; top: var(--mobile-top-height); inset-inline: 0; z-index: 2;
    display: grid; place-items: start center; pointer-events: none; height: 96px;
    background: var(--profile-bg, var(--bg)); clip-path: inset(0 0 max(0px, calc(100% - var(--pull-offset, 0px))) 0); }
  body[data-profile-cover][data-pull-refresh] #pull-status { top: 0; }
  #pull-status .pinwheel { translate: 0 calc(var(--pull-offset, 0px) - 40px); }
  body.pull-settling #pull-status .pinwheel { transition: translate var(--pull-return); }
  .top-inner .brand { width: min(175px, 55vw); }
  .shell { display: block; --content-inset: 17px; padding: 0 var(--content-inset) calc(86px + env(safe-area-inset-bottom)); }
  body[data-pull-refresh] .shell { min-height: calc(100svh - var(--mobile-top-height)); display: grid; grid-template-columns: minmax(0, 1fr); }
  body[data-pull-refresh] .main-column { display: flex; flex-direction: column; }
  body[data-pull-refresh] main { flex: 1; }
  body[data-profile-cover] .shell { margin-top: calc(-1 * var(--mobile-top-height)); }
  #desktop-back { display: none; }
  .shell:has(.themed-profile) { padding: 0; }
  .themed-profile { min-height: calc(100dvh - var(--mobile-top-height)); padding-block-end: calc(72px + env(safe-area-inset-bottom)); }
  body[data-profile-cover] .themed-profile { min-height: 100dvh; }
  nav { position: fixed; inset: auto 0 0; z-index: 4; background: rgb(255 255 255 / var(--bar-opacity));
    -webkit-backdrop-filter: blur(var(--bar-blur)); backdrop-filter: blur(var(--bar-blur)); border-top: 1px solid var(--line); flex-direction: row; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); gap: 0; max-height: none; }
  nav > a { flex: 1; justify-content: center; flex-direction: column; gap: 3px; border-radius: 0; padding: 9px 2px; font-size: .78rem; }
  nav::after { content: ""; position: absolute; inset: auto 0 0; height: env(safe-area-inset-bottom); background: #fff; pointer-events: none; }
  nav .desktop-only { display: none; }
  #notice { bottom: calc(75px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { body.pull-settling #pull-status .pinwheel { transition: none; } }
.settings-list { display: grid; }
.settings-list > * { width: 100%; min-height: 52px; padding: 12px 8px; border: 0; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; background: transparent; text-align: left; color: var(--ink); }
.settings-list > button, .settings-list > a { display: grid; justify-content: stretch; align-content: center; gap: 4px; border-radius: 0;
  font-size: 1rem; font-weight: 700; }
.settings-list small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; line-height: 1.4; }
.settings-list input[role="switch"] { appearance: none; flex: none; width: 46px; height: 27px; min-height: 0;
  margin: 0; padding: 0; border: 0; border-radius: 30px; background: #d2d2d8; cursor: pointer; position: relative; }
.settings-list input[role="switch"]::before { content: ""; position: absolute; inset: 3px auto 3px 3px; width: 21px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; }
.settings-list input[role="switch"]:checked { background: #237f55; }
.settings-list input[role="switch"]:checked::before { translate: 19px 0; }
.settings-list :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.notification-row { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notification-list .person > .button + .button { margin-left: 0; }
.search { grid-template-columns: minmax(0, 1fr) auto; padding-top: 8px; margin-bottom: 10px; }
.search input { min-height: var(--button-height); padding: 6px 11px; border-radius: var(--button-radius); }
.pin-login { width: min(100%, 320px); margin: 0 auto; text-align: center; }
.pin-profile { display: grid; justify-items: center; gap: 4px; margin-bottom: 22px; overflow-wrap: anywhere; }
.pin-profile .avatar { --avatar-size: 82px; --avatar-border: 4px; margin-bottom: 5px; }
.pin-profile h1 { margin: 0; font-size: 1.55rem; }
.pin-login form { gap: 10px; }
.pin-login .code { padding-inline: 13px; }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.keypad button { color: var(--ink); background: #f7f6f8; min-height: 44px; font-size: 1.05rem; touch-action: manipulation; }
.keypad [data-digit="0"] { grid-column: 2; }
.keypad [data-digit="delete"] { font-size: .85rem; }
.pin-alternatives { display: grid; justify-items: center; margin-top: 8px; font-size: .9rem; }
.pin-alternatives > * { display: grid; place-items: center; min-height: 42px; padding: 6px 10px; }
.pin-alternatives .text-button { color: inherit; font-weight: 750; }
.recovery-panel { display: grid; gap: 10px; margin-top: 20px; }
.recovery-notice { margin: 22px auto 0; text-align: center; }
.recovery-lead { margin: 0 0 12px; font-weight: 700; }
.recovery-code { display: block; padding: 12px; border-radius: 8px; background: #f7f6f8; font: 700 1rem ui-monospace, monospace; text-align: center; overflow-wrap: anywhere; }
[data-form="profile"] textarea { min-height: 100px; }
.profile-edit { width: min(100%, 440px); margin-inline: auto; }
.profile-back { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.profile-back:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.devices { margin-top: 24px; }
.devices h2 { font-size: 1rem; }
.device-list { list-style: none; padding: 0; }
.device-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line); padding-block: 10px; }
.edit-header-region { --opacity-width: 52px; --edit-avatar-size: 112px; --edit-header-top: clamp(76px, 26vw, 120px);
  --header-fade-start: calc(var(--edit-header-top) + var(--edit-avatar-size) * .25);
  --header-fade-end: calc(var(--edit-header-top) + var(--edit-avatar-size) * .75);
  position: relative; isolation: isolate; display: grid; padding-top: var(--edit-header-top); }
.edit-header { position: absolute; inset: 0; display: block; background: linear-gradient(#f7f6f8 var(--header-fade-start), transparent var(--header-fade-end)); }
.edit-header img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top;
  opacity: var(--header-opacity, 50%);
  -webkit-mask-image: linear-gradient(#000 var(--header-fade-start), transparent var(--header-fade-end));
  mask-image: linear-gradient(#000 var(--header-fade-start), transparent var(--header-fade-end)); }
.edit-profile-details { position: relative; isolation: isolate; display: grid; gap: 13px; pointer-events: none; }
.edit-profile-details > :is(a, label, .handle-field) { pointer-events: auto; }
.edit-avatar { position: relative; justify-self: center; }
.edit-avatar .avatar { --avatar-size: var(--edit-avatar-size); --avatar-border: calc(var(--avatar-size) / 24); }
.edit-pencil, .header-opacity-button { position: absolute; display: grid; place-items: center; height: 35px;
  padding: 0; border: 2px solid #fff; border-radius: 18px; background: var(--button-bg); color: var(--ink); }
.header-opacity-button { top: 8px; right: 8px; width: var(--opacity-width); font-size: .75rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.edit-pencil { top: -2px; right: -8px; width: 35px; }
.edit-pencil .icon { width: 17px; height: 17px; }
.edit-header .edit-pencil { top: 8px; right: 8px; }
.edit-header-region:has(.header-opacity-button) .edit-header .edit-pencil { right: calc(14px + var(--opacity-width)); }
.profile-image-editor { display: grid; gap: 16px; }
.upload-button { position: relative; cursor: pointer; }
.upload-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.avatar-presets { min-width: 0; border: 0; margin: 0; padding: 0; }
.avatar-presets legend { padding: 0 0 8px; font-weight: 700; }
.avatar-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.avatar-choices label { display: grid; position: relative; place-items: center; padding: 8px 4px; cursor: pointer; container-type: inline-size; }
.avatar-choices input { position: absolute; opacity: 0; min-height: 0; width: 1px; height: 1px; padding: 0; }
.avatar-choices .avatar { --avatar-size: min(100cqi, 72px); --avatar-border: 3px;
  border-width: round(up, calc(var(--avatar-size) / 24), 1px); }
.edit-media-preview { display: block; justify-self: center; width: min(100%, 280px); aspect-ratio: 1; object-fit: contain; }
.empty-header-preview { border: 1px solid var(--line); background: #f7f6f8; }
.edit-media-preview.avatar { --avatar-size: 112px; --avatar-border: calc(var(--avatar-size) / 24); width: var(--avatar-size); }
.profile-image-editor .text-button { justify-self: center; }
.color-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 5px; font-size: .82rem; }
.color-choices input { min-height: 33px; padding: 3px; }
.reset-profile-colors { justify-self: center; min-height: 33px; font-size: .72rem; }
#image-crop { width: min(92vw, 400px); max-height: 90dvh; border: 0; border-radius: 12px; padding: 16px; }
#image-crop::backdrop { background: #17152080; }
.crop-viewport { position: relative; width: min(100%, 276px); margin-inline: auto; overflow: hidden; }
.crop-viewport.round::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: 50%; box-shadow: 0 0 0 140px #0008, inset 0 0 0 1px #fff9; }
#image-crop canvas { display: block; width: 100%; aspect-ratio: 1; touch-action: none; cursor: grab; }
#image-crop canvas:active { cursor: grabbing; }
#image-crop label { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; }
#image-crop input { min-height: 28px; padding: 0; accent-color: var(--accent); }
.crop-actions { display: flex; justify-content: flex-end; gap: 8px; }
