:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242323;
  background: #f6f5f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #242323;
  --muted: #898783;
  --line: #e8e6e1;
  --accent: #7956cf;
  --accent-dark: #6140b5;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #f6f5f2; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.profile-header {
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1060px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eceae6;
  background: rgba(255, 255, 255, .94);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #302943; text-decoration: none; font-size: 19px; font-weight: 650; letter-spacing: -.06em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #302943; font-family: Georgia, serif; font-size: 21px; }
.profile-header nav { display: flex; align-items: center; gap: 10px; }
.profile-header nav a { color: #77736f; text-decoration: none; font-size: 12px; }

.profile-shell { width: min(940px, calc(100% - 40px)); margin: 38px auto 80px; }
.profile-cover { position: relative; height: clamp(180px, 30vw, 285px); overflow: hidden; border: 1px solid rgba(61, 50, 84, .08); border-radius: 20px; background: linear-gradient(130deg, #211c2b, #4a3156 52%, #8a5367); }
.cover-fallback { position: absolute; inset: 0; background: radial-gradient(ellipse at 75% 35%, rgba(223, 173, 180, .34), transparent 25%), radial-gradient(ellipse at 22% 100%, rgba(157, 125, 196, .36), transparent 42%); }
.profile-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.image-control { display: flex; justify-content: center; }
.image-control button { min-height: 34px; padding: 0 12px; border: 1px solid #e8e3ee; border-radius: 7px; color: #55456f; background: rgba(255, 255, 255, .95); font-size: 11px; font-weight: 650; }
.image-control button:hover { background: #f5f1fb; }
.image-control button:disabled { cursor: wait; opacity: .65; }
.banner-control { position: absolute; right: 16px; bottom: 16px; }

.profile-summary { min-height: 146px; padding: 0 12px; display: flex; align-items: center; gap: 22px; }
.avatar-column { width: 134px; margin-top: -45px; display: grid; justify-items: center; gap: 8px; }
.avatar-frame { width: 118px; height: 118px; overflow: hidden; display: grid; place-items: center; border: 5px solid #f6f5f2; border-radius: 50%; color: #fff; background: #5d486f; font-family: Georgia, serif; font-size: 45px; box-shadow: 0 7px 22px rgba(32, 24, 43, .14); }
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity { min-width: 0; padding: 17px 0 0; }
.eyebrow { color: #9c8ac7; font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.profile-identity h1 { margin: 7px 0 5px; overflow-wrap: anywhere; color: #2b2535; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 4vw, 38px); font-weight: 400; letter-spacing: -.04em; }
.share-link { margin: 17px 0 0 auto; color: #765ab4; text-decoration: none; font-size: 11px; font-weight: 650; }
.share-link:hover { color: var(--accent-dark); }
.profile-status { min-height: 18px; margin: 2px 12px 0; color: #6e6480; font-size: 11px; }
.profile-error { margin: 12px; color: #b33e50; font-size: 12px; }

.stories-section { margin-top: 21px; }
.section-heading { margin: 0 0 17px; padding-bottom: 12px; display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 6px 0 0; color: #302943; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 400; letter-spacing: -.03em; }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.story-card { min-width: 0; overflow: hidden; border: 1px solid #e8e5e0; border-radius: 13px; background: #fff; box-shadow: 0 8px 25px rgba(44, 37, 54, .035); }
.story-card img { width: 100%; height: 155px; display: block; object-fit: cover; background: linear-gradient(130deg, #29213b, #79566d); }
.story-card-body { padding: 17px 18px 19px; }
.story-card time { color: #9a8ab3; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.story-card h3 { margin: 8px 0; color: #302943; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 400; }
.story-card p { margin: 0; color: #77736f; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.story-edit-button {
  min-height: 30px;
  margin-top: 12px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #67313a;
  border-radius: 18px;
  color: #f0d9d7;
  background: #271619;
  text-decoration: none;
  font-size: 10px;
  transition: border-color .16s, background .16s;
}
.story-edit-button:hover { border-color: #bd4a59; background: #451820; }
.empty-stories { grid-column: 1 / -1; padding: 40px 18px; border: 1px dashed #ded9e5; border-radius: 13px; color: #898783; background: rgba(255, 255, 255, .58); text-align: center; font-size: 12px; }

@media (max-width: 620px) {
  .profile-header { min-height: 62px; padding: 8px 17px; flex-wrap: wrap; row-gap: 8px; }
  .profile-header nav { width: 100%; justify-content: flex-end; gap: 8px; }
  .profile-header nav a { font-size: 10px; }
  .profile-shell { width: calc(100% - 24px); margin-top: 18px; }
  .profile-cover { height: 190px; border-radius: 14px; }
  .profile-summary { min-height: 130px; padding: 0 4px; gap: 12px; }
  .avatar-column { width: 99px; margin-top: -35px; }
  .avatar-frame { width: 92px; height: 92px; border-width: 4px; font-size: 36px; }
  .image-control button { min-height: 31px; padding: 0 8px; font-size: 9px; }
  .share-link { max-width: 70px; text-align: right; line-height: 1.5; }
  .story-grid { grid-template-columns: 1fr; }
  .story-card img { height: 175px; }
}

:root {
  color-scheme: dark;
  color: #eee5e2;
  background: #100d0e;
  --ink: #eee5e2;
  --muted: #a39796;
  --line: #392326;
  --accent: #bd2034;
  --accent-dark: #98182a;
}

body { color: var(--ink); background: radial-gradient(ellipse at 70% 0%, rgba(116, 22, 36, .16), transparent 30%), #100d0e; }
.profile-header { border-color: #3a2024; background: rgba(20, 14, 16, .95); }
.brand { color: #f0e5e2; font-family: "Spectral SC", Georgia, serif; letter-spacing: .1em; text-transform: uppercase; }
.brand-mark { color: #f6e8e4; background: #8d1d2c; font-family: "UnifrakturCook", Georgia, serif; }
.profile-header nav .profile-nav-link {
  min-height: 32px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #67313a;
  border-radius: 6px;
  color: #f0d9d7;
  background: #271619;
  font-size: 10px;
}
.profile-header nav .profile-nav-link:hover { border-color: #bd4a59; color: #fff0ef; background: #451820; }
.share-link:hover { color: #ef8790; }
.profile-cover { border-color: #4a282e; background: linear-gradient(130deg, #130e10, #46151f 52%, #791c2b); }
.cover-fallback { background: radial-gradient(ellipse at 75% 35%, rgba(208, 68, 80, .32), transparent 25%), radial-gradient(ellipse at 22% 100%, rgba(112, 22, 36, .4), transparent 42%); }
.image-control button { border-color: #67313a; color: #f0d9d7; background: rgba(29, 17, 19, .94); }
.image-control button:hover { background: #451820; }
.avatar-frame { border-color: #100d0e; color: #f5d6d5; background: #641927; }
.eyebrow { color: #ce6874; }
.profile-identity h1, .section-heading h2, .story-card h3 { color: #f0e5e2; font-family: "UnifrakturCook", "Old English Text MT", Georgia, serif; font-weight: 700; }
.profile-status { color: #aa9896; }
.share-link { color: #e27e88; }
.stories-section .section-heading { border-color: #392326; }
.story-card { border-color: #3e272b; background: #191214; box-shadow: 0 8px 25px rgba(0, 0, 0, .23); }
.story-card img { background: linear-gradient(130deg, #1d1215, #791c2b); }
.story-card time { color: #d18489; }
.story-card p { color: #b2a09d; }
.empty-stories { border-color: #543038; color: #aa9896; background: rgba(25, 18, 20, .7); }

@media (max-width: 620px) {
  .profile-header { background: rgba(20, 14, 16, .98); }
  .profile-header nav .profile-nav-link { padding: 0 8px; font-size: 9px; }
}

.profile-header .brand-mark {
  display: block;
  border-radius: 50%;
  background: transparent;
  object-fit: contain;
}
.profile-logout {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #67313a;
  border-radius: 6px;
  color: #f0d9d7;
  background: #271619;
  font-size: 10px;
}
.profile-logout:hover { border-color: #bd4a59; background: #451820; }
.profile-logout:disabled { cursor: wait; opacity: .65; }
.profile-cover { z-index: 0; }
.profile-summary { position: relative; z-index: 1; align-items: flex-start; }
.avatar-column { position: relative; z-index: 2; }
.avatar-frame { position: relative; z-index: 2; }
.profile-identity { padding-top: 21px; }
.profile-username { margin: 0 0 8px; color: #d18489; font-family: "Spectral SC", Georgia, serif; font-size: 10px; letter-spacing: .06em; }
.profile-identity .profile-bio { max-width: 550px; margin: 0; color: #c5b4b1; font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-facts {
  margin: 8px 12px 0;
  padding: 14px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #392326;
  border-bottom: 1px solid #392326;
}
.profile-fact { min-width: 0; padding: 4px 15px; display: grid; gap: 5px; border-right: 1px solid #392326; }
.profile-fact:last-child { border-right: 0; }
.profile-fact strong { overflow: hidden; color: #f0e5e2; font-family: "Spectral SC", Georgia, serif; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.profile-fact span { color: #a79593; font-size: 9px; }

@media (max-width: 620px) {
  .profile-summary { align-items: center; }
  .profile-identity { padding-top: 16px; }
  .profile-identity .profile-bio { font-size: 10px; }
  .profile-facts { margin: 6px 4px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-fact { padding: 9px 10px; }
  .profile-fact:nth-child(2) { border-right: 0; }
  .profile-fact:nth-child(3), .profile-fact:nth-child(4) { border-top: 1px solid #392326; }
  .profile-header nav { gap: 10px; }
  .profile-logout { padding: 0 8px; font-size: 9px; }
}
