:root {
  --paper: #ece9e1;
  --surface: #fffdf8;
  --white: #ffffff;
  --ink: #292824;
  --muted: #706e66;
  --line: #c9c3b6;
  --terracotta: #c9562d;
  --terracotta-dark: #963e22;
  --olive: #66704b;
  --olive-dark: #444c31;
  --esparto: #a47746;
  --soft-brown: #675548;
  --danger: #a12e27;
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
  font-family: "Be Vietnam Pro", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
button, input, select, textarea { color: inherit; font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 25px; line-height: 1.16; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
a { color: inherit; }
.srOnly { height: 1px; margin: -1px; overflow: hidden; position: absolute; width: 1px; clip: rect(0, 0, 0, 0); }
.eyebrow { color: var(--terracotta); font-size: 11px; font-weight: 900; letter-spacing: 0.08em; margin-bottom: 6px; text-transform: uppercase; }
.muted { color: var(--muted); }

input, select, textarea {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}
textarea { min-height: 82px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--olive); outline: 2px solid rgba(102, 112, 75, 0.16); }
label { display: grid; font-size: 12px; font-weight: 800; gap: 6px; }
label span { color: var(--muted); font-weight: 500; }

.primary, .olive, .subtleAction, .fileAction, .compactButton, .logoutLink {
  border: 0;
  border-radius: 6px;
  font-weight: 850;
  min-height: 44px;
  padding: 10px 15px;
}
.primary { background: var(--terracotta); color: #fff; }
.primary:hover { background: var(--terracotta-dark); }
.olive { background: var(--olive); color: #fff; }
.olive:hover { background: var(--olive-dark); }
.wide { width: 100%; }
.compactButton { min-height: 36px; padding: 7px 13px; }
.subtleAction { background: transparent; color: var(--soft-brown); min-height: 34px; padding-left: 0; text-align: left; }
.fileAction { align-items: center; background: transparent; border: 1px solid var(--line); display: inline-flex; min-height: 36px; padding: 7px 12px; }

.brandLockup { align-items: center; display: inline-flex; gap: 8px; }
.brandLockup img { height: 38px; mix-blend-mode: multiply; object-fit: contain; width: 38px; }
.brandLockup span, .accessBrand h1 { font-size: 23px; font-weight: 850; letter-spacing: 0; }
.brandLockup.compact img { height: 30px; width: 30px; }
.brandLockup.compact span { font-size: 18px; }

.qrLanding {
  background: var(--ink);
  color: #fff;
  min-height: 100dvh;
}
.qrLandingMedia { align-items: center; background: #171714; display: flex; min-height: 52dvh; }
.qrLandingMedia video { max-height: 62dvh; object-fit: contain; width: 100%; }
.qrLandingMedia .emptyVideo { color: #bbb7ad; padding: 40px 24px; text-align: center; width: 100%; }
.qrLandingBody { margin: 0 auto; max-width: 620px; padding: 22px 20px 36px; }
.qrLandingBody h1 { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.qrLandingBody .brandLockup { margin-bottom: 20px; }
.qrLandingBody .brandLockup img { background: #f5f3ed; border-radius: 5px; mix-blend-mode: normal; }
.qrLandingBody p:not(.eyebrow) { color: #d3d0c7; line-height: 1.55; }
.qrLandingBody .subtleAction { color: #d9a984; display: block; margin-bottom: 14px; }

.accessGate { min-height: 100dvh; }
.accessBrand { padding: 34px 22px 20px; text-align: center; }
.accessBrand img { height: 172px; margin: 0 auto 10px; mix-blend-mode: multiply; object-fit: contain; width: 172px; }
.accessBrand h1 { font-size: 31px; margin-bottom: 5px; }
.accessBrand p { color: var(--muted); margin-bottom: 0; }
.accessPanel { background: var(--surface); border-top: 1px solid var(--line); min-height: 50dvh; padding: 18px 18px 38px; }
.accessTabs { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 22px; }
.accessTab { background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-size: 13px; font-weight: 800; min-height: 44px; padding: 8px 4px; }
.accessTab.active { border-color: var(--terracotta); color: var(--ink); }
.accessForm { display: grid; gap: 15px; margin: 0 auto; max-width: 480px; }
.fieldPair { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.formIntro { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 0; }
.fieldHint { color: var(--muted); font-size: 12px; line-height: 1.4; margin: -7px 0 4px; }
.formStatus { color: var(--terracotta-dark); font-size: 13px; font-weight: 750; margin: 14px auto 0; max-width: 480px; min-height: 20px; }

.appShell { min-height: 100dvh; }
.desktopRail { display: none; }
.mobileApp { background: var(--surface); margin: 0 auto; max-width: 720px; min-height: 100dvh; padding-bottom: calc(74px + var(--bottom-safe)); }
.mobileHeader { align-items: center; background: rgba(255, 253, 248, 0.98); border-bottom: 2px solid var(--olive); box-shadow: 0 3px 10px rgba(41, 40, 36, 0.1); display: grid; gap: 8px; grid-template-columns: 82px minmax(0, 1fr) 44px; height: 58px; padding: 6px 12px; position: sticky; top: 0; z-index: 30; }
.headerLeft { align-items: center; display: flex; height: 42px; }
.headerBack, .headerActivity { background: transparent; border: 0; height: 42px; padding: 8px; position: relative; width: 40px; }
.headerBack > img { height: 23px; object-fit: contain; transform: rotate(180deg); width: 23px; }
.miniBrand { background: transparent; border: 0; padding: 0; }
.miniBrand img { height: 40px; margin-left: auto; mix-blend-mode: multiply; object-fit: contain; width: 40px; }
.headerTitle { font-size: 15px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.headerActivity > img { height: 25px; object-fit: contain; width: 25px; }
.badge { align-items: center; background: var(--terracotta); border-radius: 50%; color: #fff; display: inline-flex; font-size: 9px; height: 17px; justify-content: center; min-width: 17px; padding: 2px; position: absolute; right: -4px; top: 0; }

.appView { min-height: calc(100dvh - 126px); }
.communityIntro { background: var(--surface); border-bottom: 1px solid var(--line); border-left: 6px solid var(--terracotta); padding: 17px 18px 15px; }
.communityIntro h1 { font-size: 23px; margin: 0; }
.communityIntro p { color: var(--olive-dark); font-size: 13px; font-weight: 800; margin: 2px 0 0; }
.designHero { align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 116px minmax(0, 1fr); min-height: 190px; padding: 14px 16px; }
.designHeroMedia { aspect-ratio: 9 / 16; align-self: start; background: #272720; border-radius: 6px; max-height: 206px; overflow: hidden; }
.designHeroMedia video, .designHeroMedia img { height: 100%; object-fit: contain; width: 100%; }
.designHeroMedia .noHeaderVideo { align-items: center; color: #c8c1b5; display: flex; height: 100%; justify-content: center; padding: 30px; text-align: center; }
.designHeroCopy { align-self: center; min-width: 0; padding: 8px 0 8px 16px; position: relative; }
.designHeroCopy h1 { display: -webkit-box; margin-bottom: 8px; overflow: hidden; padding-right: 34px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.designHeroCopy > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.5; }
.designShare { position: absolute; right: 0; top: 2px; }
.wallMeta { color: var(--soft-brown); display: flex; font-size: 12px; font-weight: 800; gap: 13px; }

.composer { background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 16px; }
.composerTop { display: grid; gap: 10px; grid-template-columns: 40px minmax(0, 1fr); }
.composer textarea { background: transparent; border: 0; min-height: 68px; padding: 7px 0; }
.composer textarea:focus { outline: 0; }
.avatar { border-radius: 50%; flex: 0 0 auto; height: 40px; object-fit: cover; width: 40px; }
.avatarFallback { align-items: center; background: var(--esparto); color: #fff; display: inline-flex; font-weight: 900; justify-content: center; }
.commentAvatar { height: 30px; width: 30px; }
.composerBottom { align-items: center; display: flex; gap: 8px; justify-content: flex-end; margin-left: 50px; }
.mediaPreview { margin: 8px 0 10px 50px; }
.mediaPreview img, .mediaPreview video { border-radius: 6px; max-height: 320px; object-fit: cover; width: 100%; }
.readOnlyNotice { background: #ece8dd; border-bottom: 1px solid var(--line); color: var(--soft-brown); font-size: 13px; line-height: 1.45; padding: 13px 18px; }

.feed { background: var(--surface); }
.socialPost { border-bottom: 1px solid var(--line); padding: 14px 16px 10px; }
.postHead { align-items: center; display: grid; gap: 9px; grid-template-columns: 40px minmax(0, 1fr) auto; }
.authorButton { background: transparent; border: 0; min-width: 0; padding: 0; text-align: left; }
.authorButton strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.authorButton span { color: var(--muted); display: block; font-size: 11px; margin-top: 2px; }
.postDesign { background: transparent; border: 0; color: var(--olive); font-size: 10px; font-weight: 900; padding: 4px 0; text-transform: uppercase; }
.postBody { margin-left: 49px; }
.postText { font-size: 14px; line-height: 1.52; margin: 9px 0; white-space: pre-wrap; }
.postMedia { background: #292922; border-radius: 6px; margin: 9px 0; max-height: 72dvh; object-fit: contain; width: 100%; }
.postActions { align-items: center; display: flex; gap: 6px; justify-content: space-between; margin-top: 8px; }
.postActions button { background: transparent; border: 0; color: var(--muted); font-size: 12px; font-weight: 800; min-height: 34px; padding: 5px 4px; }
.postActions button:hover { color: var(--terracotta); }
.reactionSummary { color: var(--soft-brown); font-size: 11px; font-weight: 750; margin: 2px 0 0; }
.emptyFeed { color: var(--muted); padding: 48px 24px; text-align: center; }

.viewHeader { background: var(--surface); border-bottom: 1px solid var(--line); padding: 26px 18px 18px; }
.viewHeader h1 { margin-bottom: 7px; }
.viewHeader > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.5; }
.sectionTitle { background: #e8e3d8; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); font-size: 12px; margin: 0; padding: 11px 16px; text-transform: uppercase; }
.designList, .activityList, .peopleList, .compactPostList { background: var(--surface); }
.designRow { align-items: center; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 48px; padding: 0 8px 0 0; }
.designRowMain { align-items: center; background: transparent; border: 0; display: grid; gap: 12px; grid-template-columns: 58px minmax(0, 1fr); min-width: 0; padding: 14px 8px 14px 16px; text-align: left; width: 100%; }
.designRowCopy { min-width: 0; }
.activityRow { align-items: center; background: transparent; border: 0; border-bottom: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 40px minmax(0, 1fr) auto; padding: 14px 16px; text-align: left; width: 100%; }
.designThumb { background: var(--olive); border-radius: 6px; height: 58px; object-fit: cover; width: 58px; }
.designRow strong, .activityRow strong { display: block; font-size: 14px; }
.designRow strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.designRow p, .activityRow p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.designRow small { color: var(--olive); display: block; font-size: 10px; margin-top: 6px; }
.rowArrow { color: var(--terracotta); font-weight: 900; }
.activityRow > i { color: var(--terracotta); font-size: 22px; font-style: normal; }
.activityRow.unread { background: #f5ede7; }

.profileHeader { background: var(--surface); border-bottom: 1px solid var(--line); padding: 22px 18px 18px; }
.profileIdentity { align-items: center; display: grid; gap: 16px; grid-template-columns: 82px minmax(0, 1fr) 36px; }
.profileAvatar { border: 3px solid var(--esparto); border-radius: 50%; height: 82px; object-fit: cover; width: 82px; }
.profileIdentity h1 { margin-bottom: 3px; }
.profileIdentity p { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.profileBio { font-size: 14px; line-height: 1.5; margin: 16px 0 0; }
.profileStats { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.profileStats span { color: var(--muted); font-size: 10px; padding: 10px 3px; text-align: center; }
.profileStats strong { color: var(--ink); display: block; font-size: 16px; }
.profileCommands { display: flex; gap: 8px; margin-top: 14px; }
.profileCommands button { flex: 1; }
.profileCommands:empty { display: none; }
.profileSettings { align-self: start; background: transparent; border: 1px solid var(--line); border-radius: 50%; font-weight: 900; height: 34px; padding: 0; width: 34px; }
.highlightBand { background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; padding: 14px 12px; }
.highlightList { display: flex; gap: 12px; width: max-content; }
.highlight { background: transparent; border: 0; padding: 0; text-align: center; width: 72px; }
.highlightMedia { align-items: center; background: #e8e3d8; border: 2px solid var(--olive); border-radius: 50%; display: flex; height: 62px; justify-content: center; overflow: hidden; width: 62px; }
.highlightMedia img { height: 100%; object-fit: cover; width: 100%; }
.highlightMedia { position: relative; }
.highlightMedia i { background: rgba(41, 40, 36, 0.86); bottom: 0; color: #fff; font-size: 8px; font-style: normal; left: 0; padding: 3px 0; position: absolute; right: 0; }
.highlight span { display: block; font-size: 10px; font-weight: 800; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profileFeedTitle { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 900; margin: 0; padding: 13px 16px; text-transform: uppercase; }

.bottomNav { background: #30312b; border-top: 3px solid var(--esparto); bottom: 0; box-shadow: 0 -6px 18px rgba(41, 40, 36, 0.2); display: grid; grid-template-columns: repeat(5, 1fr); left: 0; padding-bottom: var(--bottom-safe); position: fixed; right: 0; z-index: 40; }
.bottomNav button { align-items: center; background: transparent; border: 0; color: #d3d0c7; display: flex; flex-direction: column; font-size: 10px; font-weight: 800; height: 66px; justify-content: center; padding: 7px 2px; position: relative; }
.bottomNav .navIcon { filter: invert(87%) sepia(5%) saturate(205%) hue-rotate(5deg) brightness(96%); height: 24px; margin-bottom: 4px; object-fit: contain; width: 24px; }
.bottomNav button.active { color: #f3a27d; }
.bottomNav button.active .navIcon { filter: invert(73%) sepia(31%) saturate(1019%) hue-rotate(324deg) brightness(100%); }

.searchHeader { background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 16px 0; position: sticky; top: 58px; z-index: 20; }
.searchBox input { background: #f2efe7; }
.searchTabs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.searchTabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-size: 12px; font-weight: 850; min-height: 42px; }
.searchTabs button.active { border-color: var(--terracotta); color: var(--ink); }
.personRow { align-items: center; background: transparent; border: 0; border-bottom: 1px solid var(--line); display: grid; gap: 11px; grid-template-columns: 40px minmax(0, 1fr); padding: 12px 16px; text-align: left; width: 100%; }
.personRow strong, .personRow small { display: block; }
.personRow small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.compactPost { background: transparent; border: 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; padding: 13px 16px; text-align: left; width: 100%; }
.compactPost span { color: var(--ink); font-size: 13px; }
.compactPost small { color: var(--olive); font-size: 10px; font-weight: 800; }
.emptyCompact { color: var(--muted); font-size: 13px; margin: 0; padding: 18px 16px; }

.sheet { background: var(--surface); border: 0; border-radius: 8px 8px 0 0; bottom: 0; color: var(--ink); margin: auto 0 0; max-height: 88dvh; max-width: none; overflow-y: auto; padding: 0 16px calc(24px + var(--bottom-safe)); width: 100%; }
.sheet::backdrop { background: rgba(34, 32, 27, 0.55); }
.sheetHeader { align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin: 0 -16px 16px; padding: 14px 16px; position: sticky; top: 0; z-index: 2; }
.sheetHeader h2 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheetHeader button { background: transparent; border: 0; color: var(--terracotta-dark); flex: 0 0 auto; font-weight: 800; }
.sheet > label { margin: 14px 0; }
.commentItem { display: grid; gap: 9px; grid-template-columns: 32px minmax(0, 1fr); padding: 10px 0; }
.commentItem strong { font-size: 12px; }
.commentItem p { font-size: 13px; line-height: 1.45; margin: 3px 0 0; }
.commentMedia { border-radius: 6px; margin-top: 7px; max-height: 240px; object-fit: cover; width: 100%; }
.commentComposer { border-top: 1px solid var(--line); display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; margin-top: 12px; padding-top: 14px; }
.commentComposer button { min-width: 78px; }
.reactionChoices { display: grid; gap: 8px; }
.reactionChoice { align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 6px; display: flex; font-weight: 850; justify-content: space-between; min-height: 48px; padding: 11px 13px; text-align: left; }
.reactionChoice span { color: var(--muted); font-size: 11px; }
.memberProfileVideo, .highlightVideo { background: #222; border-radius: 7px; max-height: 480px; width: 100%; }
.highlightVideo { aspect-ratio: 9 / 16; object-fit: contain; }
.videoTitle { display: -webkit-box; margin-top: 13px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.highlightActions { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
.iconButton { align-items: center; background: transparent; border: 0; display: inline-flex; height: 38px; justify-content: center; padding: 8px; width: 38px; }
.iconButton img { height: 21px; object-fit: contain; width: 21px; }
.shareDesignButton { justify-self: center; }
.actionMenu { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; }
.actionMenu > button { align-items: center; background: transparent; border: 0; border-bottom: 1px solid var(--line); display: grid; gap: 13px; grid-template-columns: 34px minmax(0, 1fr) 16px; min-height: 66px; padding: 10px 3px; text-align: left; }
.actionMenu > button:last-child { border-bottom: 0; }
.actionMenu > button:active { background: #eee9df; }
.actionMenu .actionIcon { height: 27px; object-fit: contain; width: 27px; }
.actionMenu .actionNext { height: 16px; opacity: 0.55; width: 16px; }
.actionMenu strong, .actionMenu small { display: block; }
.actionMenu strong { font-size: 14px; }
.actionMenu small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.shareDesignSummary { padding: 2px 2px 15px; }
.shareDesignSummary h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.createChoices { display: grid; gap: 10px; }
.createChoices button { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--olive); border-radius: 6px; padding: 15px 14px; text-align: left; }
.createChoices button:first-child { border-left-color: var(--terracotta); }
.createChoices strong, .createChoices span { display: block; }
.createChoices span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.postTarget { box-shadow: inset 5px 0 var(--terracotta); transition: box-shadow 180ms ease; }
.switchRow { align-items: center; display: flex !important; grid-template-columns: auto 1fr; }
.switchRow input { min-height: 18px; width: 18px; }
.toast { background: var(--ink); border-radius: 6px; bottom: calc(76px + var(--bottom-safe)); color: #fff; font-size: 13px; font-weight: 750; left: 50%; max-width: calc(100% - 32px); padding: 11px 14px; position: fixed; transform: translateX(-50%); z-index: 80; }

@media (min-width: 720px) {
  .accessGate { align-items: center; display: grid; grid-template-columns: minmax(300px, 0.9fr) minmax(430px, 1.1fr); }
  .accessBrand { padding: 40px; }
  .accessBrand img { height: 260px; width: 260px; }
  .accessPanel { align-content: center; border-left: 1px solid var(--line); border-top: 0; display: grid; min-height: 100dvh; padding: 50px; }
  .accessTabs, .accessForm, .formStatus { width: 100%; }
}

@media (min-width: 980px) {
  .appShell { display: grid; grid-template-columns: 250px minmax(0, 720px); justify-content: center; }
  .desktopRail { align-self: start; display: flex; flex-direction: column; height: 100dvh; padding: 26px 24px; position: sticky; top: 0; }
  .navBrand { background: transparent; border: 0; margin-bottom: 32px; padding: 0; }
  .desktopNav { display: grid; gap: 5px; }
  .desktopNav button, .logoutLink { align-items: center; background: transparent; border: 0; border-radius: 6px; display: flex; font-size: 15px; font-weight: 800; gap: 10px; min-height: 46px; padding: 12px; position: relative; text-align: left; }
  .desktopNav button > .navIcon { height: 22px; object-fit: contain; width: 22px; }
  .desktopNav button.active > .navIcon { filter: invert(35%) sepia(57%) saturate(1292%) hue-rotate(337deg) brightness(86%); }
  .desktopNav button.active { background: #e7e2d7; color: var(--terracotta-dark); }
  .logoutLink { color: var(--muted); margin-top: auto; }
  .mobileApp { border-left: 1px solid var(--line); border-right: 1px solid var(--line); margin: 0; max-width: 720px; padding-bottom: 0; }
  .bottomNav { display: none; }
  .sheet { border-radius: 9px; bottom: auto; margin: auto; max-height: 84dvh; max-width: 560px; padding-bottom: 24px; }
}

@media (max-width: 430px) {
  .fieldPair { grid-template-columns: 1fr; }
  .accessBrand img { height: 138px; width: 138px; }
  .accessBrand { padding-top: 24px; }
  .postBody { margin-left: 0; }
  .composerBottom { margin-left: 0; }
  .mediaPreview { margin-left: 0; }
}
