/* Shared rhythm for the existing phone shell. The bundle's code-path values
   identify public screens that do not expose named component classes. */
:root {
  --gr-layout-gutter: 16px;
  --gr-layout-section: 22px;
  --gr-layout-card-gap: 10px;
}

/* The local test helper is always reachable from Home and through its login page.
   Outside Home it should never cover filters, posts, or application actions. */
body:not(:has(.gr-original-home)) #ganrao-test-login-entry {
  display: none !important;
}

body:has(.gr-original-home) #ganrao-test-login-entry {
  right: max(var(--gr-layout-gutter), calc((100% - var(--gr-pro-shell-width)) / 2 + var(--gr-layout-gutter))) !important;
}

#root [code-path$="ui.tsx:413:13"] {
  font-size: 0.75rem;
  line-height: 1.25;
}

.gr-original-home > [code-path$="ui.tsx:172:5"] {
  margin-inline-start: var(--gr-layout-gutter);
}

.gr-amap-card {
  margin-inline: var(--gr-layout-gutter);
}

.gr-amap-card .gr-amap-card-head {
  min-height: 65px;
  padding: 10px 13px;
}

.gr-amap-card .gr-amap-surface.is-preview {
  height: 132px;
}

.gr-amap-card .gr-amap-card-foot {
  padding-block: 7px;
}

.gr-original-home > [code-path$="Home.tsx:72:7"] {
  padding: 12px var(--gr-layout-gutter) 2px;
}

.gr-original-home [code-path$="Home.tsx:77:11"] {
  min-height: 78px;
}

.gr-original-home [code-path$="Home.tsx:80:15"] {
  overflow-wrap: anywhere;
}

#root [code-path$="ui.tsx:159:5"] {
  gap: 8px;
  padding: 0 var(--gr-layout-gutter);
  margin-block-start: var(--gr-layout-section);
  min-height: 44px;
}

#root [code-path$="ui.tsx:159:5"] > [code-path$="ui.tsx:160:7"] {
  font-size: 1.125rem;
}

#root [code-path$="ui.tsx:163:9"] {
  flex-shrink: 0;
  min-width: 44px;
  justify-content: flex-end;
}

#root [code-path$="ui.tsx:338:5"] {
  margin: var(--gr-layout-card-gap) var(--gr-layout-gutter);
  padding: 14px;
}

#root [code-path$="ui.tsx:159:5"] + [code-path$="ui.tsx:338:5"] {
  margin-top: 1px;
}

#root [code-path$="ui.tsx:349:7"] {
  align-items: flex-start;
  margin-block-start: 11px;
}

#root [code-path$="ui.tsx:351:9"] {
  display: -webkit-box;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#root [code-path$="ui.tsx:367:7"] {
  row-gap: 3px;
  column-gap: 7px;
  margin-top: 10px;
  padding-top: 6px;
}

#root [code-path$="ui.tsx:376:9"] {
  min-height: 34px;
}

.gr-original-home > [code-path$="Home.tsx:118:7"] {
  margin-inline: var(--gr-layout-gutter);
  padding: 13px;
}

.gr-original-home > :is([code-path$="Home.tsx:138:7"], [code-path$="Home.tsx:163:7"]) {
  padding-inline: var(--gr-layout-gutter);
  scroll-padding-inline: var(--gr-layout-gutter);
}

/* Activity tools and rows share a leading edge. Date and venue stay readable
   even when an activity has a long title or location. */
#root [code-path$="Activities.tsx:52:5"] > [code-path$="ui.tsx:172:5"] {
  margin: 12px var(--gr-layout-gutter) var(--gr-layout-card-gap);
}

#root [code-path$="Activities.tsx:57:7"] {
  margin: 0 var(--gr-layout-gutter) 12px;
  padding: 6px;
}

#root [code-path$="Activities.tsx:59:11"] {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 0;
}

#root [code-path$="Activities.tsx:63:17"] {
  gap: 4px;
  min-height: 53px;
  justify-content: center;
  padding: 5px 1px;
}

#root [code-path$="Activities.tsx:65:19"] {
  margin: 0;
  color: var(--gr-pro-secondary) !important;
  font-size: 0.6875rem;
  line-height: 1.3;
  text-align: center;
}

#root [code-path$="Activities.tsx:63:17"]:has(span[style*="font-weight: 700"]) [code-path$="Activities.tsx:65:19"] {
  color: var(--gr-pro-brand) !important;
}

#root [code-path$="Activities.tsx:71:9"] {
  display: none;
}

#root [code-path$="Activities.tsx:79:7"] {
  gap: 4px;
  padding-inline: var(--gr-layout-gutter);
  margin-block-end: 3px;
}

#root [code-path$="Activities.tsx:81:11"] {
  flex: 0 1 auto;
  min-width: 44px;
  padding-inline: 8px;
}

#root [code-path$="Activities.tsx:87:9"] {
  flex: 0 0 auto;
  min-width: 60px;
  padding-inline: 8px;
}

#root [code-path$="Activities.tsx:93:9"] {
  min-height: 44px;
  margin-inline-start: var(--gr-layout-gutter);
  color: var(--gr-pro-brand) !important;
}

#root [code-path$="Activities.tsx:105:11"] {
  margin: 0 var(--gr-layout-gutter) var(--gr-layout-card-gap);
}

#root [code-path$="Activities.tsx:106:13"] {
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
}

#root [code-path$="Activities.tsx:106:13"] > :first-child {
  flex: 0 0 76px;
  width: 76px !important;
  height: 76px !important;
}

#root [code-path$="Activities.tsx:108:15"] {
  margin-inline-start: 0;
}

#root :is([code-path$="Activities.tsx:110:17"], [code-path$="Activities.tsx:111:17"]) {
  color: var(--gr-pro-muted) !important;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.45;
}

#root [code-path$="Activities.tsx:112:17"] {
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

/* Community entries, image groups, and focusable action rows. */
#root [code-path$="Square.tsx:110:7"] {
  height: auto;
  min-height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gr-layout-gutter) 0;
}

#root [code-path$="Square.tsx:112:11"] {
  flex: 1 1 0;
  padding-inline: 5px;
}

#root :is([code-path$="Square.tsx:120:9"], [code-path$="Square.tsx:130:9"]) {
  display: grid;
  gap: var(--gr-layout-card-gap);
  padding: 12px var(--gr-layout-gutter) 72px;
}

#root :is([code-path$="Square.tsx:125:15"], [code-path$="Square.tsx:140:15"]) {
  display: none;
}

#root :is([code-path$="Square.tsx:30:5"], [code-path$="Square.tsx:133:15"]) {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--gr-pro-line);
  border-radius: var(--gr-pro-card);
  background: var(--gr-pro-paper);
}

#root [code-path$="Square.tsx:51:7"] {
  color: var(--gr-pro-secondary) !important;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#root [code-path$="Square.tsx:53:9"]:has(> img:nth-child(2)) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#root [code-path$="Square.tsx:53:9"] > img {
  display: block;
  max-width: 100%;
}

#root [code-path$="Square.tsx:53:9"]:has(> img:nth-child(2)) > img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
  object-fit: cover;
}

#root [code-path$="Square.tsx:70:7"] {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  padding-top: 3px;
  border-top: 1px solid var(--gr-pro-line);
}

#root [code-path$="Square.tsx:70:7"] > button {
  min-height: var(--gr-pro-tap);
}

#root [code-path$="Square.tsx:146:7"] {
  background: var(--gr-pro-brand) !important;
  width: 48px;
  height: 48px;
}

/* Global search prioritizes the field, preserves focus, and groups its results. */
#root [code-path$="Misc.tsx:173:5"] {
  background: var(--gr-pro-canvas) !important;
}

#root [code-path$="Misc.tsx:174:7"] {
  gap: 4px;
  border-bottom: 1px solid var(--gr-pro-line);
  padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 8px;
  background: var(--gr-pro-paper) !important;
}

#root [code-path$="Misc.tsx:178:9"] {
  gap: 6px;
  min-width: 0;
  min-height: var(--gr-pro-tap);
  border: 1px solid var(--gr-pro-line);
  border-radius: var(--gr-pro-control);
  padding-inline: 10px 4px;
  background: var(--gr-pro-inset);
}

#root [code-path$="Misc.tsx:178:9"]:focus-within {
  outline: 2px solid var(--gr-pro-brand);
  outline-offset: 1px;
}

#root [code-path$="Misc.tsx:180:11"] {
  width: 0;
  min-width: 0;
  margin: 0;
  outline: none;
  padding-block: 8px;
  color: var(--gr-pro-ink);
  font-size: 1rem;
}

#root [code-path$="Misc.tsx:180:11"]:focus-visible {
  outline: none;
}

#root :is([code-path$="Misc.tsx:175:9"], [code-path$="Misc.tsx:183:23"], [code-path$="Misc.tsx:185:9"]) {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  place-items: center;
}

#root [code-path$="Misc.tsx:189:9"] {
  padding: 18px var(--gr-layout-gutter);
}

#root [code-path$="Misc.tsx:191:11"] {
  flex-wrap: wrap;
}

#root [code-path$="Misc.tsx:191:11"] > * {
  display: inline-flex;
  min-height: var(--gr-pro-tap);
  align-items: center;
  padding-inline: 9px;
  border: 1px solid var(--gr-pro-line);
  border-radius: var(--gr-pro-control);
  background: var(--gr-pro-paper) !important;
  color: var(--gr-pro-brand) !important;
  font-size: 0.8125rem;
}

#root [code-path$="Misc.tsx:196:11"] {
  margin-top: 13px;
  color: var(--gr-pro-muted) !important;
  line-height: 1.55;
}

#root [code-path$="Misc.tsx:169:5"] {
  padding: 13px var(--gr-layout-gutter) 4px;
}

#root [code-path$="Misc.tsx:159:5"] {
  min-height: 60px;
  margin: 5px var(--gr-layout-gutter);
  padding: 10px 12px;
  border: 1px solid var(--gr-pro-line);
  border-radius: var(--gr-pro-control);
  background: var(--gr-pro-paper);
}

#root :is([code-path$="Misc.tsx:162:9"], [code-path$="Misc.tsx:163:9"]) {
  display: -webkit-box;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 350px) {
  :root {
    --gr-layout-gutter: 14px;
  }
}
