:root {
  color-scheme: dark;
  --surface: #5c5c5c;
  --text: #fff;
  --muted: #dedede;
  --light: #707070;
  --dark: #484848;
  --raised: -7px -7px 16px var(--light), 7px 7px 16px var(--dark);
  --inset: inset 5px 5px 10px var(--dark), inset -5px -5px 10px var(--light);
  font: 16px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--surface); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: var(--surface); color: var(--text); }
button, input, textarea { font: inherit; color: inherit; }
button, input, textarea, summary, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.app { max-width: 560px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) max(26px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(26px, env(safe-area-inset-left)); }
.header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.brand-mark { width: 50px; height: 50px; border-radius: 17px; box-shadow: var(--raised); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 26px; height: 26px; }
.brand-copy { min-width: 0; }
.eyebrow { margin: 0 0 6px; font-size: .75rem; letter-spacing: .15em; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.04em; margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
.version { margin-left: auto; flex: none; border-radius: 999px; padding: 8px 14px; font-size: .875rem; color: var(--muted); box-shadow: inset 3px 3px 7px var(--dark), inset -3px -3px 7px var(--light); }
.divider { height: 2px; width: 100%; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 1px 1px var(--dark), 0 1px 0 var(--light); margin: 0 0 28px; }
.icon-row { display: flex; align-items: center; gap: 20px; padding: 2px 0; margin-bottom: 29px; }
.raised { background: var(--surface); box-shadow: var(--raised); }
.icon-button { position: relative; flex: none; width: 74px; height: 74px; padding: 3px; border-radius: 22px; }
.icon-button img { display: block; width: 68px; height: 68px; border-radius: 19px; object-fit: cover; }
.icon-plus { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid var(--surface); border-radius: 50%; background: var(--surface); box-shadow: 3px 3px 6px var(--dark); font-size: 19px; }
.icon-copy { min-width: 0; overflow-wrap: anywhere; }
.icon-copy p { margin: 0 0 2px; font-size: .9375rem; font-weight: 550; line-height: 1.5; }
.text-button { display: inline-block; background: var(--surface); text-decoration: underline; text-underline-offset: 4px; font-size: .875rem; padding: 8px 0; min-height: 40px; }
.field { margin-bottom: 22px; }
label { display: block; font-size: .9375rem; line-height: 1.5; margin-bottom: 10px; font-weight: 500; }
.optional { color: var(--muted); font-size: .8125rem; font-weight: 400; margin-left: 7px; }
input:not([type=file]), textarea { width: 100%; border: 1px solid transparent; border-radius: 999px; background: var(--surface); box-shadow: var(--inset); padding: 15px 22px; font-size: 1rem; line-height: 1.5; min-height: 56px; appearance: none; -webkit-appearance: none; }
textarea { border-radius: 26px; resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: #d5d5d5; opacity: 1; }
[aria-invalid=true] { border-color: #fff !important; }
.field-error { font-size: .875rem; line-height: 1.6; margin: 9px 5px 0; overflow-wrap: anywhere; }
.action-divider { margin-top: 6px; margin-bottom: 26px; }
.primary { width: 100%; min-height: 56px; border-radius: 999px; padding: 15px 19px; display: flex; align-items: center; justify-content: center; gap: 11px; font-size: .9375rem; font-weight: 600; transition: transform .12s ease; }
.primary:active, .icon-button:active { transform: translate(1px, 1px); box-shadow: inset 4px 4px 8px var(--dark), inset -4px -4px 8px var(--light); }
.status { margin: 18px 3px 0; font-size: .875rem; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.recovery-link { display: block; width: fit-content; min-height: 44px; padding: 12px 0; font-size: .875rem; line-height: 1.5; text-underline-offset: 4px; }
.help { margin-top: 25px; }
summary { min-height: 44px; padding: 12px 0; font-size: .875rem; color: var(--muted); cursor: pointer; }
.help-content { color: var(--muted); font-size: .875rem; line-height: 1.75; overflow-wrap: anywhere; }
.help-content p { margin: 8px 0 14px; }
code { font-size: .875rem; overflow-wrap: anywhere; }
footer { margin-top: 26px; text-align: center; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.author-link { display: inline-block; color: #c1d8e9; font-weight: 500; text-decoration: none; border-radius: 4px; min-height: 24px; padding: 3px 1px; }
.author-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sr-only:focus-visible { position: static; width: auto; height: auto; clip: auto; white-space: normal; }
.noscript { padding: 24px; text-align: center; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .author-link { background-image: linear-gradient(105deg, #dce1e6 0%, #dce1e6 34%, #a9cce8 43%, #72ace0 49%, #a9cce8 55%, #dce1e6 64%, #dce1e6 100%); background-size: 300% 100%; background-position: 100% 50%; background-clip: text; -webkit-background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: author-wave 4.8s ease-in-out infinite; animation-play-state: paused; }
  .author-link.wave-active { animation-play-state: running; }
}
@keyframes author-wave { 0%,12% { background-position: 100% 50%; } 82%,100% { background-position: 0% 50%; } }
@media (max-width: 360px) {
  .app { padding-left: max(20px,env(safe-area-inset-left)); padding-right: max(20px,env(safe-area-inset-right)); }
  .version { display: none; }
  h1 { font-size: 1.375rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .author-link { background: none; color: #c1d8e9; -webkit-text-fill-color: currentColor; }
}
/* Profile category bar: natural horizontal scrolling on small iPhone screens. */
.type-tabs { display:flex; gap:12px; overflow-x:auto; padding:12px 10px 16px; margin:0 -10px 15px; scrollbar-width:none; }
.type-tabs::-webkit-scrollbar { display:none; }
.type-tabs button { flex:none; background:var(--surface); border-radius:999px; padding:12px 17px; min-height:44px; font-size:.875rem; white-space:nowrap; color:var(--muted); box-shadow:-3px -3px 8px var(--light),3px 3px 8px var(--dark); }
.type-tabs button[aria-selected=true] { color:#fff; box-shadow:inset 3px 3px 7px var(--dark),inset -3px -3px 7px var(--light); }
.type-note { color:var(--muted); font-size:.875rem; line-height:1.6; margin:0 0 24px; }
.secondary { background:var(--surface); border-radius:999px; width:100%; padding:15px 18px; min-height:56px; display:flex; align-items:center; justify-content:center; gap:10px; margin-top:20px; font-size:.9375rem; }
.secondary:active { box-shadow:var(--inset); }
select { font:inherit; color:inherit; background:var(--surface); width:100%; min-height:56px; padding:15px 22px; border:1px solid transparent; border-radius:999px; box-shadow:var(--inset); }
select:focus-visible { outline:2px solid #fff; outline-offset:5px; }
input[type=file]:not(.sr-only) { display:block; width:100%; font-size:1rem; color:var(--muted); }
input[type=file]::file-selector-button { font:inherit; color:#fff; border:0; background:var(--surface); padding:12px 15px; margin:6px 12px 8px 0; border-radius:999px; box-shadow:-3px -3px 8px var(--light),3px 3px 8px var(--dark); }
.checkbox-field { display:flex; align-items:center; gap:14px; padding:5px 3px; }
.checkbox-field label { margin:0; flex:1; }
input[type=checkbox] { width:22px; height:22px; min-height:22px; margin:0; padding:0; appearance:auto; -webkit-appearance:auto; box-shadow:none; border-radius:5px; accent-color:#777; }
.field-note { font-size:.8125rem; color:var(--muted); margin:8px 5px 0; overflow-wrap:anywhere; }
dialog { color:#fff; background:var(--surface); border:1px solid #777; border-radius:28px; padding:26px; width:min(460px,calc(100vw - 40px)); max-height:85vh; max-height:85svh; overflow-y:auto; box-shadow:10px 10px 35px #333; }
dialog::backdrop { background:rgba(0,0,0,.5); }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.dialog-heading h2 { font-size:1.0625rem; margin:0; }
.dialog-note { font-size:.875rem; line-height:1.6; color:var(--muted); margin:0 0 24px; }
