:root {
  --paper: #f6f1e9;
  --card: #fffdf9;
  --ink: #19201d;
  --muted: #6d746f;
  --line: #ded8ce;
  --accent: #f06449;
  --accent-dark: #ca422a;
  --sage: #b9c8b8;
  --shadow: 0 18px 60px rgba(38, 34, 27, .1);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-height: 100vh; font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark, .big-mark, .empty-mark {
  display: grid; place-items: center; font-family: var(--serif); font-style: italic;
  background: var(--accent); color: white; transform: rotate(-7deg);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 700; letter-spacing: -.8px; }
.brand-mark { width: 35px; height: 35px; border-radius: 12px 8px 13px 9px; font-size: 22px; box-shadow: 4px 5px 0 #26342d; }
.topbar {
  position: sticky; z-index: 20; top: 0; height: 76px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1120px) / 2)); background: rgba(246, 241, 233, .9);
  border-bottom: 1px solid rgba(25, 32, 29, .08); backdrop-filter: blur(18px);
}
.desktop-nav { display: flex; align-items: center; gap: 8px; }
.nav-link { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: 14px; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav-link:hover, .nav-link.active { color: var(--ink); background: rgba(255,255,255,.65); }
.upload-pill, .button {
  border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 14px; padding: 12px 18px;
  font-weight: 700; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s;
}
.upload-pill, .button.primary { color: white; background: var(--ink); box-shadow: 0 8px 20px rgba(25,32,29,.16); }
.upload-pill:hover, .button:hover { transform: translateY(-2px); }
.button.primary:hover { background: #2e3833; }
.button.secondary { background: #ebe5db; color: var(--ink); }
.button.full { width: 100%; }
.button:disabled { opacity: .42; pointer-events: none; }
.avatar-link, .mini-avatar, .profile-avatar {
  display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: #25322b; font-weight: 700;
  overflow: hidden;
}
.avatar-link img, .mini-avatar img, .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-link { width: 40px; height: 40px; margin-left: 5px; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.mobile-nav { display: none; }
.feed-shell { width: min(100% - 32px, 760px); margin: 0 auto; padding: 68px 0 100px; }
.feed-intro { display: flex; justify-content: space-between; align-items: end; padding: 0 4px 46px; }
.feed-intro h1, .upload-card h1, .invite-card h1, .profile-head h1 {
  margin: 6px 0 0; font-family: var(--serif); font-size: clamp(39px, 6vw, 62px); line-height: .98; letter-spacing: -2.6px;
}
.feed-intro > p { margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow { margin: 0; color: var(--accent-dark); text-transform: uppercase; letter-spacing: 1.8px; font-size: 11px; font-weight: 700; }
.feed { display: grid; gap: 28px; }
.feed-tabs {
  width: fit-content; display: flex; gap: 4px; margin: -18px 4px 24px; padding: 4px;
  background: #e9e3da; border-radius: 14px;
}
.feed-tabs a { min-width: 108px; padding: 10px 16px; border-radius: 11px; color: var(--muted); text-align: center; font-size: 13px; font-weight: 700; }
.feed-tabs a.active { background: var(--card); color: var(--ink); box-shadow: 0 3px 12px rgba(30,25,20,.08); }
.photo-card { overflow: hidden; background: var(--card); border: 1px solid rgba(25,32,29,.09); border-radius: 26px; box-shadow: 0 8px 30px rgba(46,40,31,.06); }
.photo-meta { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.person { display: flex; align-items: center; gap: 11px; }
.person span:last-child { display: grid; gap: 1px; }
.person strong { font-size: 14px; }
.person small, .photo-meta time { color: var(--muted); font-size: 12px; }
.mini-avatar { width: 39px; height: 39px; }
.photo-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { display: grid; place-items: center; border: 0; width: 34px; height: 34px; background: transparent; border-radius: 10px; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: #f3ece3; color: var(--accent-dark); }
.icon-button svg { width: 17px; }
.photo-frame { display: block; background: #e9e4db; }
.photo-frame img { display: block; width: 100%; height: auto; max-height: 760px; object-fit: contain; }
.empty-state { padding: 80px 25px; display: grid; justify-items: center; text-align: center; }
.feed-empty { border: 1px dashed #c9c1b6; border-radius: 26px; }
.empty-mark { width: 62px; height: 62px; border-radius: 22px 15px 23px 18px; font-size: 38px; box-shadow: 6px 7px 0 #26342d; }
.empty-state h1, .empty-state h2 { font-family: var(--serif); font-size: 38px; margin: 25px 0 8px; }
.empty-state p { max-width: 420px; color: var(--muted); margin: 0 0 24px; }
.narrow { width: min(100% - 32px, 680px); margin: 0 auto; }
.page-space { padding: 54px 0 100px; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--muted); font-size: 14px; font-weight: 600; }
.upload-card, .invite-card { background: var(--card); border: 1px solid rgba(25,32,29,.08); border-radius: 28px; padding: clamp(25px, 6vw, 52px); box-shadow: var(--shadow); }
.upload-card h1, .invite-card h1 { font-size: clamp(38px, 8vw, 57px); margin-bottom: 15px; }
.muted { color: var(--muted); line-height: 1.6; }
.upload-form { margin-top: 34px; display: grid; gap: 14px; }
.drop-zone {
  position: relative; overflow: hidden; min-height: 340px; display: grid; align-content: center; justify-items: center; gap: 8px;
  background: #f2ede5; border: 1.5px dashed #bcb5ab; border-radius: 22px; cursor: pointer; transition: border .2s, background .2s;
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--accent); background: #faeee8; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon { width: 58px; height: 58px; display: grid; place-items: center; background: var(--ink); color: white; border-radius: 20px; margin-bottom: 8px; }
.drop-icon svg { width: 27px; height: 27px; }
.drop-zone > span:last-of-type { color: var(--muted); font-size: 13px; }
.upload-preview { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #eee8df; }
.drop-zone.has-preview .upload-preview { display: block; }
.form-error { padding: 12px 14px; color: #8b2e20; background: #fbe3dc; border-radius: 12px; font-size: 13px; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.auth-brand { position: relative; overflow: hidden; min-height: 100vh; padding: clamp(40px, 7vw, 100px); display: flex; flex-direction: column; justify-content: center; background: #24342c; color: #f8f3ea; }
.auth-brand h1 { position: relative; z-index: 2; margin: 15px 0 24px; font: 700 clamp(54px, 8vw, 106px)/.88 var(--serif); letter-spacing: -5px; }
.auth-brand > p:last-of-type { position: relative; z-index: 2; max-width: 450px; margin: 0; color: #c9d1c8; font-size: 17px; line-height: 1.6; }
.big-mark { position: relative; z-index: 2; width: 76px; height: 76px; border-radius: 25px 18px 28px 20px; font-size: 46px; box-shadow: 8px 9px 0 #f0c76b; margin-bottom: 50px; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.orbit-one { width: 600px; height: 600px; right: -280px; bottom: -210px; }
.orbit-two { width: 410px; height: 410px; right: -180px; bottom: -110px; border-color: rgba(240,100,73,.38); }
.auth-panel { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(100%, 410px); }
.auth-logo { margin-bottom: 68px; }
.auth-card h2 { margin: 10px 0 7px; font: 700 43px/1 var(--serif); letter-spacing: -1.5px; }
.stack { display: grid; gap: 17px; margin-top: 32px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
label small { color: var(--muted); font-weight: 400; }
input { width: 100%; border: 1px solid var(--line); background: #fffefa; border-radius: 13px; padding: 14px 15px; color: var(--ink); outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,100,73,.12); }
.profile-shell {
  --profile-accent: #f06449; --profile-deep: #5f281e; position: relative; color: var(--ink);
  width: min(100% - 32px, 1180px); min-height: calc(100vh - 76px); margin: 0 auto; padding: 46px 0 110px;
}
.profile-theme-dark {
  --profile-deep: #060807; --paper: #0b0e0c; --card: #121613;
  --ink: #f2f5ef; --muted: #abb3ad; --line: #3b443e; --accent-dark: var(--profile-accent);
}
.profile-theme-midnight {
  --paper: #0b1020; --card: #141b2e; --ink: #f2f5ff; --muted: #adb7cf;
  --line: #39445f; --accent-dark: var(--profile-accent);
}
.profile-theme-slate {
  --paper: #10171b; --card: #1b252a; --ink: #f2f7f8; --muted: #adbdc3;
  --line: #425158; --accent-dark: var(--profile-accent);
}
.profile-theme-ocean {
  --paper: #071b24; --card: #0d2935; --ink: #effaff; --muted: #a6c6d2;
  --line: #356070; --accent-dark: var(--profile-accent);
}
.profile-theme-wine {
  --paper: #1d0c13; --card: #2a141d; --ink: #fff3f6; --muted: #d3adb8;
  --line: #62404b; --accent-dark: var(--profile-accent);
}
.profile-theme-plum {
  --paper: #1a1020; --card: #281830; --ink: #fbf3ff; --muted: #cbb3d3;
  --line: #594262; --accent-dark: var(--profile-accent);
}
.profile-theme-ember {
  --paper: #21100b; --card: #321912; --ink: #fff5ef; --muted: #d7b5a8;
  --line: #69483b; --accent-dark: var(--profile-accent);
}
.profile-theme-moss {
  --paper: #0d1710; --card: #17251a; --ink: #f1f8f0; --muted: #adc2af;
  --line: #3c5541; --accent-dark: var(--profile-accent);
}
.profile-theme-sand {
  --paper: #e6d5b9; --card: #f1e4cf; --ink: #30271d; --muted: #746554;
  --line: #cbb99c; --accent-dark: var(--profile-accent);
}
.profile-theme-transparent {
  --paper: rgba(7,10,8,.04); --card: rgba(8,12,9,.08); --ink: #fff;
  --muted: #e1e7e2; --line: rgba(238,248,240,.5); --accent-dark: var(--profile-accent);
}
.profile-accent-coral { --profile-accent: #f06449; --profile-deep: #5f281e; }
.profile-accent-lime { --profile-accent: #d5ff58; --profile-deep: #26320b; }
.profile-accent-forest { --profile-accent: #6fac7c; --profile-deep: #203d2a; }
.profile-accent-ocean { --profile-accent: #58a7d3; --profile-deep: #193b54; }
.profile-accent-violet { --profile-accent: #a98bd7; --profile-deep: #392957; }
.profile-accent-gold { --profile-accent: #e3a63d; --profile-deep: #5b3b12; }
.pos-x-0 { --pos-x: 0%; } .pos-x-10 { --pos-x: 10%; } .pos-x-20 { --pos-x: 20%; }
.pos-x-30 { --pos-x: 30%; } .pos-x-40 { --pos-x: 40%; } .pos-x-50 { --pos-x: 50%; }
.pos-x-60 { --pos-x: 60%; } .pos-x-70 { --pos-x: 70%; } .pos-x-80 { --pos-x: 80%; }
.pos-x-90 { --pos-x: 90%; } .pos-x-100 { --pos-x: 100%; }
.pos-y-0 { --pos-y: 0%; } .pos-y-10 { --pos-y: 10%; } .pos-y-20 { --pos-y: 20%; }
.pos-y-30 { --pos-y: 30%; } .pos-y-40 { --pos-y: 40%; } .pos-y-50 { --pos-y: 50%; }
.pos-y-60 { --pos-y: 60%; } .pos-y-70 { --pos-y: 70%; } .pos-y-80 { --pos-y: 80%; }
.pos-y-90 { --pos-y: 90%; } .pos-y-100 { --pos-y: 100%; }
.profile-wallpaper { position: fixed; z-index: 0; inset: 76px 0 0; overflow: hidden; background: var(--profile-deep); }
.profile-wallpaper::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(15,18,16,.18), rgba(15,18,16,.55)); }
.profile-theme-transparent .profile-wallpaper::after { background: linear-gradient(rgba(7,10,8,0), rgba(7,10,8,.04)); }
.profile-wallpaper img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos-x, 50%) var(--pos-y, 50%); filter: saturate(.92); }
.profile-surface { overflow: hidden; position: relative; z-index: 1; background: var(--card); border: 1px solid rgba(25,32,29,.12); border-radius: 28px; box-shadow: 0 24px 80px rgba(12,18,15,.24); }
.profile-theme-transparent .profile-surface { border-color: var(--line); backdrop-filter: blur(1px); box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.profile-theme-transparent :is(.profile-head, .profile-customizer, .profile-details, .profile-grid) { text-shadow: 0 1px 3px rgba(0,0,0,.86); }
.profile-banner { position: relative; height: clamp(210px, 32vw, 360px); overflow: hidden; background: var(--profile-deep); }
.profile-banner > img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos-x, 50%) var(--pos-y, 50%); }
.banner-pattern { position: absolute; inset: 0; display: grid; align-content: center; gap: 0; overflow: hidden; color: rgba(255,255,255,.13); background: linear-gradient(125deg, var(--profile-deep), var(--profile-accent)); transform: scale(1.05); }
.banner-pattern span { display: block; white-space: nowrap; font: 700 clamp(58px, 10vw, 126px)/.68 var(--serif); font-style: italic; letter-spacing: -5px; transform: rotate(-4deg) translateX(-2%); }
.banner-pattern span:nth-child(2) { transform: rotate(-4deg) translateX(15%); color: rgba(255,255,255,.22); }
.profile-head { position: relative; display: flex; align-items: center; gap: 28px; padding: 0 34px 34px; }
.profile-head h1 { font-size: clamp(42px, 7vw, 66px); }
.profile-shell:is(.profile-theme-dark, .profile-theme-slate, .profile-theme-midnight, .profile-theme-ocean, .profile-theme-wine, .profile-theme-plum, .profile-theme-ember, .profile-theme-moss, .profile-theme-transparent) :is(
  .profile-head h1, .profile-customizer summary, .art-picker strong, .theme-picker > strong, .position-heading strong
) { color: var(--ink); }
.profile-head p:last-child { color: var(--muted); margin: 9px 0 0; }
.profile-stats { display: flex; gap: 16px; margin-top: 11px; color: var(--muted); font-size: 13px; }
.profile-stats strong { color: var(--ink); }
.profile-stats a:hover { color: var(--accent-dark); }
.profile-avatar { width: 140px; height: 140px; flex: 0 0 auto; margin-top: -56px; font: 700 50px var(--serif); background: var(--profile-accent); box-shadow: 0 0 0 7px var(--card), 0 0 0 9px var(--profile-accent); }
.profile-layout, .profile-main-column, .profile-sidebar { min-width: 0; }
.profile-address { margin: 12px 28px 28px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
.profile-address span { display: block; margin-bottom: 4px; color: var(--profile-accent); text-transform: uppercase; letter-spacing: 1.1px; font-size: 9px; font-weight: 800; }
.profile-address strong { display: block; overflow-wrap: anywhere; font-size: 11px; font-weight: 600; }
.profile-photo-module { min-width: 0; }
.profile-module-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--profile-accent); color: #101510; }
.profile-module-title strong { font: 700 16px var(--serif); }
.profile-module-title span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 28px; border-top: 5px solid var(--profile-accent); background: color-mix(in srgb, var(--profile-accent) 7%, var(--card)); }
.profile-tile { aspect-ratio: 1; overflow: hidden; background: #e5dfd5; }
.profile-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.profile-tile:hover img { transform: scale(1.025); }
.profile-empty { grid-column: 1/-1; padding: 80px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 20px; }
.profile-actions { margin-left: auto; align-self: flex-start; display: flex; align-items: center; gap: 8px; }
.profile-actions form { margin: 0; }
.profile-actions .avatar-upload-form { display: block; }
.profile-action {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer;
}
.profile-action:hover { background: color-mix(in srgb, var(--profile-accent) 8%, var(--card)); }
.profile-action svg { width: 17px; height: 17px; }
.profile-action.sign-out { color: #a33b2b; border-color: color-mix(in srgb, #a33b2b 35%, var(--line)); }
.profile-shell:is(.profile-theme-dark, .profile-theme-slate, .profile-theme-midnight, .profile-theme-ocean, .profile-theme-wine, .profile-theme-plum, .profile-theme-ember, .profile-theme-moss, .profile-theme-transparent) .profile-action.sign-out { color: #ff9b88; border-color: rgba(255,155,136,.42); }
.profile-action.follow-action { min-width: 105px; background: var(--ink); color: white; border-color: var(--ink); }
.profile-action.follow-action.following { background: var(--card); color: var(--ink); border-color: var(--line); }
.avatar-picker { position: relative; }
.avatar-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.profile-customizer { margin: 0 28px 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--profile-accent) 4%, var(--card)); }
.profile-customizer summary { padding: 15px 18px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 700; }
.profile-customizer summary::after { content: "+"; float: right; color: var(--profile-accent); font-size: 19px; line-height: .7; }
.profile-customizer[open] summary::after { content: "–"; }
.customizer-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 24px; padding: 0 18px 18px; }
.art-pickers { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.art-pickers form { min-width: 0; }
.art-picker { position: relative; min-height: 72px; display: flex; align-items: center; grid-template-columns: none; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); cursor: pointer; }
.art-picker:hover { border-color: var(--profile-accent); }
.art-picker svg { flex: 0 0 auto; color: var(--profile-accent); }
.art-picker > span { min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; }
.art-picker strong { line-height: 1.2; }
.art-picker small { font-size: 11px; }
.art-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.theme-picker { display: grid; align-content: start; gap: 10px; }
.colour-controls { display: grid; gap: 16px; }
.theme-picker > strong { font-size: 12px; }
.theme-picker > div { display: flex; flex-wrap: wrap; gap: 8px; max-width: 225px; }
.theme-swatch { width: 31px; height: 31px; padding: 0; border: 3px solid var(--card); border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.theme-swatch.active { box-shadow: 0 0 0 2px var(--ink); }
.theme-swatch.light { background: #fffdf9; }
.theme-swatch.sand { background: #e7d4b5; }
.theme-swatch.dark { background: #0d100e; }
.theme-swatch.slate { background: #26343a; }
.theme-swatch.midnight { background: #17213a; }
.theme-swatch.ocean { background: #0d536d; }
.theme-swatch.wine { background: #64293c; }
.theme-swatch.plum { background: #5b3568; }
.theme-swatch.ember { background: #71351f; }
.theme-swatch.moss { background: #294b32; }
.theme-swatch.transparent {
  background-color: #fff;
  background-image: linear-gradient(45deg, #aab2ac 25%, transparent 25%), linear-gradient(-45deg, #aab2ac 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #aab2ac 75%), linear-gradient(-45deg, transparent 75%, #aab2ac 75%);
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  background-size: 14px 14px;
}
.theme-swatch.coral { background: #f06449; }
.theme-swatch.lime { background: #d5ff58; }
.theme-swatch.forest { background: #6fac7c; }
.theme-swatch.ocean { background: #58a7d3; }
.theme-swatch.violet { background: #a98bd7; }
.theme-swatch.gold { background: #e3a63d; }
.position-editors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 18px 18px; }
.position-editors:empty { display: none; }
.position-editor { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 12px 16px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.position-heading { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.position-heading strong { font-size: 13px; }
.position-heading span { color: var(--muted); font-size: 11px; }
.position-editor label { min-width: 0; color: var(--muted); font-size: 11px; }
.position-editor input[type="range"] { min-width: 0; padding: 7px 0; border: 0; background: transparent; box-shadow: none; accent-color: var(--profile-accent); }
.position-save { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); color: var(--card); font-size: 11px; font-weight: 700; cursor: pointer; }
.profile-theme-transparent .position-save { color: #101510; text-shadow: none; }
.details-editor { margin: 0 18px 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.details-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.details-editor-heading > div { display: grid; gap: 3px; }
.details-editor-heading strong { font-size: 13px; }
.details-editor-heading span { color: var(--muted); font-size: 11px; }
.details-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.details-fields label { min-width: 0; color: var(--muted); font-size: 11px; }
.details-fields textarea {
  width: 100%; min-height: 105px; resize: vertical; padding: 12px 13px; border: 1px solid var(--line);
  border-radius: 12px; outline: none; background: color-mix(in srgb, var(--card) 88%, var(--paper)); color: var(--ink); line-height: 1.5;
}
.details-fields textarea:focus { border-color: var(--profile-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile-accent) 18%, transparent); }
.profile-details {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 4px 28px 28px;
  background: color-mix(in srgb, var(--profile-accent) 3%, var(--card));
}
.profile-detail { position: relative; min-width: 0; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.profile-detail::after { content: ""; position: absolute; width: 82px; height: 82px; right: -43px; top: -45px; border-radius: 50%; background: var(--profile-accent); opacity: .18; }
.profile-detail.about { grid-column: 1 / -1; }
.detail-kicker { color: var(--profile-accent); text-transform: uppercase; letter-spacing: 1.5px; font-size: 10px; font-weight: 800; }
.profile-detail p { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 700 20px/1.45 var(--serif); }
.profile-detail:not(.about) p { font-size: 17px; }
.invite-card form { margin: 25px 0; }
.invite-card h2 { margin: 45px 0 15px; font: 700 25px var(--serif); }
.invite-reveal { margin-top: 24px; padding: 20px; background: #eef2eb; border: 1px solid #d3ddd0; border-radius: 16px; }
.invite-reveal p { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.invite-reveal small { display: block; margin-top: 9px; color: var(--muted); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-width: 0; }
.invite-list { padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.invite-list li { display: flex; align-items: center; gap: 13px; padding: 16px 3px; border-bottom: 1px solid var(--line); }
.invite-list li div { display: grid; gap: 3px; }
.invite-list strong { font-size: 14px; }
.invite-list small { color: var(--muted); font-size: 12px; }
.people-card { background: var(--card); border: 1px solid rgba(25,32,29,.08); border-radius: 26px; padding: clamp(24px, 6vw, 46px); box-shadow: var(--shadow); }
.people-card h1 { margin: 8px 0 26px; font: 700 46px/1 var(--serif); letter-spacing: -1.5px; }
.people-list { display: grid; }
.people-row { display: flex; align-items: center; gap: 12px; padding: 13px 3px; border-bottom: 1px solid var(--line); }
.people-row:last-child { border-bottom: 0; }
.people-row > span:last-child { display: grid; gap: 2px; }
.people-row strong { font-size: 14px; }
.people-row small { color: var(--muted); font-size: 12px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #aaa; }
.status-dot.open { background: #4f9b64; box-shadow: 0 0 0 4px #e2efe4; }
.status-dot.used { background: #aaa; }

@media (min-width: 981px) {
  .profile-shell { width: min(100% - 40px, 1040px); padding: 28px 0 90px; }
  .profile-surface { border: 2px solid var(--line); border-radius: 5px; box-shadow: 0 22px 70px rgba(0,0,0,.32); }
  .profile-banner { height: 280px; border-bottom: 2px solid var(--line); }
  .profile-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; padding: 12px; background: color-mix(in srgb, var(--paper) 82%, transparent); }
  .profile-sidebar { align-self: start; display: grid; gap: 10px; }
  .profile-head { display: grid; justify-items: center; gap: 12px; padding: 14px; border: 2px solid var(--line); background: var(--card); text-align: center; }
  .profile-avatar { width: 170px; height: 170px; margin: 0; font-size: 58px; border-radius: 2px; box-shadow: 0 0 0 3px var(--profile-accent); }
  .profile-identity { width: 100%; min-width: 0; }
  .profile-head h1 { max-width: 100%; margin-top: 4px; overflow-wrap: anywhere; font-size: 37px; letter-spacing: -1.4px; }
  .profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 14px; border: 1px solid var(--line); }
  .profile-stats > * { display: grid; gap: 2px; padding: 9px 4px; border-right: 1px solid var(--line); font-size: 10px; }
  .profile-stats > *:last-child { border-right: 0; }
  .profile-stats strong { font-size: 14px; }
  .profile-actions { width: 100%; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-self: auto; }
  .profile-actions form, .profile-action { width: 100%; }
  .profile-action { min-height: 38px; padding: 8px 9px; border-radius: 2px; font-size: 11px; }
  .profile-address { margin: 0; border: 2px solid var(--line); border-radius: 2px; }
  .profile-main-column { display: grid; align-content: start; gap: 12px; }
  .profile-customizer { margin: 0; border-width: 2px; border-radius: 2px; }
  .profile-customizer summary { padding: 11px 13px; background: var(--profile-accent); color: #101510 !important; text-transform: uppercase; letter-spacing: .8px; font-size: 10px; }
  .profile-customizer summary::after { color: #101510; }
  .customizer-panel { padding: 14px; }
  .art-picker, .position-editor, .details-editor, .details-fields textarea { border-radius: 2px; }
  .position-editors { padding: 0 14px 14px; }
  .details-editor { margin: 0 14px 14px; }
  .profile-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 0; background: transparent; }
  .profile-detail { padding: 16px; border: 2px solid var(--line); border-radius: 2px; }
  .profile-detail.about { grid-column: 1 / -1; }
  .profile-detail p { margin-top: 8px; font-size: 16px; line-height: 1.4; }
  .profile-detail:not(.about) p { font-size: 14px; }
  .profile-photo-module { overflow: hidden; border: 2px solid var(--line); background: var(--card); }
  .profile-grid { gap: 4px; padding: 10px; border-top: 0; }
  .profile-empty { padding: 52px 20px; border-radius: 2px; }
  .profile-tile { outline: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
}

@media (max-width: 980px) {
  .profile-head { flex-wrap: wrap; }
  .profile-actions { width: 100%; margin-left: 168px; }
  .customizer-panel { grid-template-columns: 1fr; }
  .theme-picker > div { max-width: none; }
  .position-editors { grid-template-columns: 1fr; }
  .profile-details { grid-template-columns: 1fr; }
  .profile-detail.about { grid-column: auto; }
}

@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .topbar { height: 66px; padding: 0 20px; }
  .desktop-nav { display: none; }
  .mobile-nav {
    position: fixed; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr); left: 0; right: 0; bottom: 0;
    height: calc(68px + env(safe-area-inset-bottom)); padding: 6px 20px env(safe-area-inset-bottom);
    background: rgba(255,253,249,.94); border-top: 1px solid var(--line); backdrop-filter: blur(18px);
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
  .mobile-nav a.active { color: var(--accent-dark); }
  .mobile-nav .mobile-upload { width: 70px; height: 52px; align-self: center; justify-self: center; border-radius: 18px; background: var(--ink); color: white; }
  .feed-shell { width: 100%; padding-top: 38px; }
  .feed-intro { padding: 0 20px 30px; align-items: start; }
  .feed-intro > p { display: none; }
  .feed-intro h1 { font-size: 43px; }
  .feed { gap: 14px; }
  .feed-tabs { margin: -8px 20px 18px; }
  .feed-tabs a { min-width: 100px; }
  .photo-card { border-left: 0; border-right: 0; border-radius: 0; }
  .photo-frame img { max-height: none; }
  .page-space { padding-top: 28px; }
  .upload-card, .invite-card { border-radius: 22px; padding: 25px 20px; }
  .drop-zone { min-height: 300px; }
  .auth-shell { display: block; }
  .auth-brand { display: none; }
  .auth-panel { min-height: calc(100vh - 76px); padding: 28px 24px; align-items: center; }
  .auth-logo { margin-bottom: 60px; }
  .profile-shell { width: 100%; padding: 0; min-height: calc(100vh - 66px); }
  .profile-wallpaper { inset: 66px 0 68px; }
  .profile-surface { border: 0; border-radius: 0; }
  .profile-banner { height: 190px; }
  .profile-head { gap: 16px; padding: 0 20px 24px; flex-wrap: wrap; }
  .profile-avatar { width: 96px; height: 96px; margin-top: -35px; font-size: 38px; box-shadow: 0 0 0 5px var(--card), 0 0 0 7px var(--profile-accent); }
  .profile-head h1 { font-size: 40px; letter-spacing: -1.5px; }
  .profile-stats { gap: 11px; flex-wrap: wrap; }
  .profile-address { margin: 0 14px 18px; }
  .profile-module-title { padding: 11px 14px; }
  .profile-grid { gap: 2px; padding: 14px 0 0; }
  .profile-actions { width: 100%; margin-left: 0; justify-content: flex-start; flex-wrap: wrap; }
  .profile-customizer { margin: 0 14px 18px; }
  .profile-customizer summary { padding: 15px; }
  .customizer-panel { grid-template-columns: 1fr; gap: 16px; padding: 0 14px 14px; }
  .art-pickers { grid-template-columns: 1fr; }
  .position-editors { grid-template-columns: 1fr; padding: 0 14px 14px; }
  .position-editor { grid-template-columns: 1fr; }
  .position-heading { display: grid; gap: 3px; }
  .position-save { width: 100%; }
  .details-editor { margin: 0 14px 14px; padding: 14px; }
  .details-editor-heading { display: grid; }
  .details-fields { grid-template-columns: 1fr; }
  .profile-details { gap: 9px; padding: 0 14px 18px; }
  .profile-detail { padding: 18px; border-radius: 15px; }
  .profile-detail p, .profile-detail:not(.about) p { font-size: 17px; }
  .copy-row { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
