/* Community and marketplace components in the phone shell. */
#root :is(
  [code-path$="Square.tsx:176:5"],
  [code-path$="Square.tsx:315:5"],
  [code-path$="Square.tsx:446:5"],
  [code-path$="Demands.tsx:47:5"],
  [code-path$="Demands.tsx:380:5"],
  .gb-page:has(> .gb-card > .gb-rule + .gb-chips + h2 + .gb-body)
) {
  --gr-community-line: #e5eaf1;
  --gr-community-ink: #283851;
  --gr-community-link: #1a6a86;
  background: var(--gr-visual-ground, #f4f5f8) !important;
}

#root :is([code-path$="Square.tsx:110:7"], [code-path$="Square.tsx:180:9"]) {
  border-bottom-color: var(--gr-community-line);
  background: var(--gr-visual-surface, #fff) !important;
  box-shadow: none;
}

#root [code-path$="Square.tsx:110:7"] {
  gap: 5px;
}

#root [code-path$="Square.tsx:112:11"] {
  position: relative;
  align-self: stretch;
  min-width: 0;
  border-bottom-color: transparent;
  border-radius: 10px 10px 0 0;
  color: var(--gr-visual-muted, #626c81) !important;
}

#root [code-path$="Square.tsx:112:11"][style*="font-weight: 700"] {
  border-bottom-color: transparent;
  background: var(--gr-visual-tile, #e9edfd);
  color: var(--gr-visual-navy, #193367) !important;
}

#root [code-path$="Square.tsx:112:11"][style*="font-weight: 700"]::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--gr-visual-blue, #2c58a1);
  content: "";
  transform: translateX(-50%);
}

#root :is([code-path$="Square.tsx:30:5"], [code-path$="Square.tsx:133:15"]),
#root [code-path$="Demands.tsx:47:5"] [code-path$="ui.tsx:338:5"] {
  border: 1px solid var(--gr-community-line);
  border-radius: 10px;
  background: var(--gr-visual-surface, #fff) !important;
  box-shadow: none;
}

#root :is([code-path$="Square.tsx:35:13"], [code-path$="Square.tsx:136:19"], [code-path$="Square.tsx:451:11"]),
#root [code-path$="Demands.tsx:47:5"] :is([code-path$="ui.tsx:343:13"], [code-path$="ui.tsx:351:9"]) {
  color: var(--gr-visual-navy, #193367) !important;
}

#root :is([code-path$="Square.tsx:38:11"], [code-path$="Square.tsx:137:19"], [code-path$="Square.tsx:452:11"], [code-path$="Square.tsx:204:21"]),
#root [code-path$="Demands.tsx:47:5"] :is([code-path$="ui.tsx:346:11"], [code-path$="ui.tsx:369:9"], [code-path$="ui.tsx:371:9"]) {
  color: var(--gr-visual-muted, #626c81) !important;
}

#root :is([code-path$="Square.tsx:51:7"], [code-path$="Square.tsx:202:19"]),
#root [code-path$="Demands.tsx:47:5"] [code-path$="ui.tsx:353:7"] {
  color: var(--gr-community-ink) !important;
  font-size: 0.875rem;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

#root :is(
  [code-path$="Square.tsx:66:22"],
  [code-path$="Square.tsx:68:9"],
  [code-path$="Square.tsx:205:21"],
  [code-path$="Square.tsx:346:11"],
  [code-path$="Square.tsx:353:11"]
) {
  color: var(--gr-community-link) !important;
}

#root :is([code-path$="Square.tsx:70:7"], [code-path$="Square.tsx:230:7"]),
#root [code-path$="Demands.tsx:47:5"] [code-path$="ui.tsx:367:7"] {
  border-top-color: var(--gr-community-line) !important;
}

#root [code-path$="Square.tsx:70:7"] {
  column-gap: 10px;
  padding-top: 0;
  font-variant-numeric: tabular-nums;
}

#root [code-path$="Square.tsx:70:7"] > button {
  padding-inline: 4px;
  border-radius: 8px;
}

#root [code-path$="Square.tsx:70:7"] > button:active {
  background: var(--gr-visual-tile, #e9edfd);
}

#root [code-path$="Square.tsx:15:5"] {
  border-radius: 12px;
  background: var(--gr-visual-tile, #e9edfd) !important;
}

#root [code-path$="Square.tsx:16:7"] {
  color: var(--gr-visual-blue, #2c58a1);
}

#root [code-path$="Square.tsx:448:7"] {
  border-bottom: 1px solid var(--gr-community-line);
  background: #f0f4ff !important;
  box-shadow: none;
}

#root [code-path$="Square.tsx:182:13"] {
  min-height: 44px;
  padding: 10px 14px 0;
}

#root [code-path$="Square.tsx:183:15"] {
  color: var(--gr-visual-muted, #626c81) !important;
  font-size: 0.875rem;
}

#root [code-path$="Square.tsx:183:15"][style*="font-weight: 700"] {
  color: var(--gr-visual-navy, #193367) !important;
}

#root [code-path$="Square.tsx:184:15"] {
  width: 20px;
  height: 2px;
}

#root [code-path$="Square.tsx:182:13"]:has([code-path$="Square.tsx:183:15"][style*="font-weight: 700"]) [code-path$="Square.tsx:184:15"] {
  background: var(--gr-visual-blue, #2c58a1) !important;
}

#root :is([code-path$="Square.tsx:188:9"], [code-path$="Square.tsx:211:17"]) {
  background: var(--gr-community-line) !important;
}

#root [code-path$="Square.tsx:231:9"] {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--gr-community-line);
  border-radius: 12px;
  background: #f4f6fb !important;
  color: var(--gr-community-ink);
  font-size: 1rem;
}

#root [code-path$="Square.tsx:235:9"] {
  flex: 0 0 auto;
  min-height: 44px;
  border-radius: 12px;
}

/* The two existing category controls retain their selected check mark. */
#root [code-path$="Demands.tsx:51:9"] {
  min-height: 46px;
  border: 1px solid #e0e7f1;
  border-radius: 12px;
  box-shadow: none;
}

#root [code-path$="Demands.tsx:53:11"] {
  min-width: 0;
  color: var(--gr-community-ink);
  font-size: 1rem;
}

#root [code-path$="Demands.tsx:64:13"] {
  min-width: 0;
  border: 1px solid;
  color: var(--gr-demand-tone);
}

#root [code-path$="Demands.tsx:64:13"]:first-child {
  --gr-demand-tone: #264e86;
  border-color: #c9d6ee;
  background: linear-gradient(135deg, #edf5ff, #dae4fc) !important; /* taste-skill-ignore: reference palette for the supply control */
}

#root [code-path$="Demands.tsx:64:13"]:last-child {
  --gr-demand-tone: #6f4d23;
  border-color: #e5d7bd;
  background: linear-gradient(135deg, #fcf7ed, #efe1c7) !important; /* taste-skill-ignore: reference palette for the demand control */
}

#root [code-path$="Demands.tsx:64:13"]:has(svg) {
  border-color: var(--gr-demand-tone);
}

#root :is([code-path$="Demands.tsx:67:17"], [code-path$="Demands.tsx:70:15"]) {
  color: var(--gr-demand-tone) !important;
  overflow-wrap: anywhere;
}

#root [code-path$="Demands.tsx:70:15"] {
  font-size: 0.75rem;
  line-height: 1.45;
}

#root [code-path$="Demands.tsx:64:13"] svg {
  fill: currentColor;
}

#root :is([code-path$="Demands.tsx:78:13"], [code-path$="Demands.tsx:89:13"], [code-path$="Demands.tsx:432:15"]) {
  border: 1px solid var(--gr-community-line) !important;
  border-radius: 999px;
  background: #fff !important;
  color: var(--gr-visual-muted, #626c81) !important;
}

#root :is([code-path$="Demands.tsx:78:13"], [code-path$="Demands.tsx:432:15"])[style*="color: rgb(255, 255, 255)"] {
  border-color: #c8d6f2 !important;
  background: var(--gr-visual-tile, #e9edfd) !important;
  color: var(--gr-visual-navy, #193367) !important;
  font-weight: 700;
}

#root :is([code-path$="Demands.tsx:96:13"][style*="font-weight: 700"], [code-path$="Demands.tsx:104:11"]) {
  color: var(--gr-community-link) !important;
}

#root [code-path$="Demands.tsx:47:5"] [code-path$="ui.tsx:150:5"] {
  background: var(--gr-visual-tile, #e9edfd) !important;
  color: var(--gr-visual-navy, #193367);
}

#root [code-path$="Demands.tsx:47:5"] [code-path$="ui.tsx:150:5"][style*="240, 147, 43"] {
  background: #f5ebd9 !important;
  color: #6f4d23;
}

/* The local detail route renders native business cards instead of the legacy page. */
#root .gb-page:has(> .gb-card > .gb-rule + .gb-chips + h2 + .gb-body) > .gb-card {
  border-color: var(--gr-community-line);
  border-radius: 12px;
  box-shadow: none;
}

#root .gb-page:has(> .gb-card > .gb-rule + .gb-chips + h2 + .gb-body) > .gb-card > .gb-chips + h2 {
  color: var(--gr-visual-navy, #193367);
  font-size: 1.25rem;
  line-height: 1.42;
}

#root .gb-page:has(> .gb-card > .gb-rule + .gb-chips + h2 + .gb-body) :is(.gb-muted, .gb-form .gb-field small) {
  color: var(--gr-visual-muted, #626c81);
}

#root .gb-page:has(> .gb-card > .gb-rule + .gb-chips + h2 + .gb-body) .gb-body {
  color: var(--gr-community-ink);
  line-height: 1.72;
}

#root .gb-page:has(> .gb-card > .gb-rule + .gb-chips + h2 + .gb-body) > .gb-card > .gb-actions {
  padding-top: 12px;
  border-top: 1px solid var(--gr-community-line);
}

/* Writing surfaces and the existing publish actions. */
#root :is([code-path$="Square.tsx:317:7"], [code-path$="Demands.tsx:382:7"]) {
  background: var(--gr-visual-surface, #fff);
}

#root :is([code-path$="Square.tsx:318:9"], [code-path$="Demands.tsx:396:9"], [code-path$="Demands.tsx:402:9"]) {
  padding-inline: 12px;
  border: 1px solid var(--gr-community-line);
  border-radius: 10px;
  background: #f8f9fc;
  color: var(--gr-community-ink) !important;
  font-size: 1rem;
  line-height: 1.6;
}

#root :is([code-path$="Square.tsx:318:9"], [code-path$="Demands.tsx:402:9"]) {
  padding-block: 10px;
}

#root [code-path$="Demands.tsx:396:9"] {
  min-height: 44px;
}

#root :is([code-path$="Square.tsx:318:9"], [code-path$="Demands.tsx:396:9"], [code-path$="Demands.tsx:402:9"])::placeholder {
  color: var(--gr-visual-muted, #626c81);
}

#root :is([code-path$="Square.tsx:334:13"], [code-path$="Demands.tsx:418:13"]) {
  border: 1px dashed #b3c4e4;
  background: #f2f5fe !important;
  color: var(--gr-visual-blue, #2c58a1) !important;
}

#root :is([code-path$="Demands.tsx:442:11"], [code-path$="Demands.tsx:449:11"]) {
  border: 1px solid var(--gr-community-line);
  background: #f7f9fd !important;
  color: var(--gr-visual-navy, #193367) !important;
}

#root :is([code-path$="Square.tsx:377:7"], [code-path$="Demands.tsx:461:7"]) {
  border-top-color: var(--gr-community-line) !important;
  background: var(--gr-visual-surface, #fff);
}

#root :is(
  [code-path$="Square.tsx:146:7"],
  [code-path$="Square.tsx:235:9"],
  [code-path$="Square.tsx:378:9"],
  [code-path$="Demands.tsx:119:7"]
),
#root [code-path$="Demands.tsx:461:7"] > [code-path$="ui.tsx:304:5"] {
  background: var(--gr-visual-blue, #2c58a1) !important;
  color: #fff !important;
}

#root :is([code-path$="Square.tsx:378:9"], [code-path$="Demands.tsx:461:7"] > [code-path$="ui.tsx:304:5"]) {
  border-radius: 12px;
}

/* The main Square feed is a continuous list of entries with optional photo previews. */
#root [code-path$="Square.tsx:109:5"] {
  --gr-community-line: #eadbd4;
  --gr-community-ink: #352a27;
  --gr-community-link: #8d3334;
  --gr-feed-accent: #a4272d;
  --gr-feed-paper: #fffdfb;
  --gr-feed-muted: #695d59;
  min-block-size: calc(100dvh - var(--gr-pro-nav-height, 62px) - env(safe-area-inset-bottom, 0px));
  background: #f7f3ef !important;
}

#root [code-path$="Square.tsx:109:5"] > [code-path$="Square.tsx:110:7"] {
  justify-content: stretch;
  gap: 0;
  height: 53px;
  padding-inline: 14px;
  border-bottom: 1px solid #763033;
  background: linear-gradient(115deg, #792326, #ab3838 75%, #b6473e) !important;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:112:11"] {
  flex: 1;
  min-height: 44px;
  padding: 7px 8px;
  border: 0;
  border-radius: 0;
  color: #f9dad0 !important;
  font-size: 0.9375rem !important;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:112:11"][style*="font-weight: 700"] {
  background: transparent;
  color: #fffaf5 !important;
  font-size: 1rem !important;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:112:11"][style*="font-weight: 700"]::after {
  bottom: 7px;
  width: 17px;
  background: #ffddd0;
}

#root [code-path$="Square.tsx:109:5"] > :is([code-path$="Square.tsx:120:9"], [code-path$="Square.tsx:130:9"]) {
  padding: 5px 14px 82px;
  background: var(--gr-feed-paper);
}

#root [code-path$="Square.tsx:109:5"] :is([code-path$="Square.tsx:30:5"], [code-path$="Square.tsx:133:15"]) {
  padding: 12px 2px 5px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:133:15"] {
  padding-block-end: 12px;
}

#root [code-path$="Square.tsx:109:5"] :is([code-path$="Square.tsx:125:15"], [code-path$="Square.tsx:140:15"]) {
  height: 1px;
  background: var(--gr-community-line) !important;
}

#root [code-path$="Square.tsx:109:5"] :is([code-path$="Square.tsx:35:13"], [code-path$="Square.tsx:136:19"]) {
  color: var(--gr-community-ink) !important;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

#root [code-path$="Square.tsx:109:5"] :is([code-path$="Square.tsx:38:11"], [code-path$="Square.tsx:137:19"]) {
  color: var(--gr-feed-muted) !important;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:51:7"] {
  display: -webkit-box;
  min-width: 0;
  margin-top: 7px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  font-size: 0.875rem;
  line-height: 1.6;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:30:5"]:has(> :is([code-path$="Square.tsx:53:9"], [code-path$="Square.tsx:60:9"])) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(70px, 21vw, 92px);
  grid-template-areas: "author author" "copy photo" "place place" "mentions mentions" "actions actions";
  align-items: start;
  column-gap: 12px;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:31:7"] { grid-area: author; }
#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:51:7"] { grid-area: copy; }
#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:66:22"] { grid-area: place; }
#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:68:9"] { grid-area: mentions; }
#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:70:7"] { grid-area: actions; }

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:30:5"] > :is([code-path$="Square.tsx:53:9"], [code-path$="Square.tsx:60:9"]) {
  display: block;
  grid-area: photo;
  min-width: 0;
  margin-block-start: 8px;
  border-radius: 8px;
}

#root [code-path$="Square.tsx:109:5"] :is([code-path$="Square.tsx:53:9"], [code-path$="Square.tsx:60:9"]) > img:first-of-type {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}

#root [code-path$="Square.tsx:109:5"] :is([code-path$="Square.tsx:53:9"], [code-path$="Square.tsx:60:9"]) > :not(img:first-of-type) {
  display: none;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:30:5"]:not(:has(> :is([code-path$="Square.tsx:53:9"], [code-path$="Square.tsx:60:9"]) > img)) {
  display: block;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:70:7"] {
  gap: 14px;
  margin-block-start: 3px;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:70:7"] > span:empty {
  display: none;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:70:7"] > button {
  min-height: 44px;
  padding-inline: 5px;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:70:7"] > button:active {
  background: #faeee9;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:146:7"] {
  width: 48px;
  height: 48px;
  background: var(--gr-feed-accent) !important;
  box-shadow: 0 4px 12px rgb(119 36 40 / 20%);
}

#root [code-path$="Square.tsx:109:5"] button:focus-visible {
  outline: 2px solid var(--gr-feed-accent);
  outline-offset: 2px;
}

#root [code-path$="Square.tsx:109:5"] [code-path$="Square.tsx:112:11"]:focus-visible {
  outline-color: #ffe3d8;
  outline-offset: -4px;
}
