/* Mobile shell and shared component styling. Existing routes and DOM stay intact. */
:root {
  --gr-pro-shell-width: 430px;
  --gr-app-width: min(100vw, var(--gr-pro-shell-width));
  --gr-page-canvas: #f6f6f6;
  --gr-page-gutter: clamp(13px, calc(var(--gr-app-width) * .04267), 19px);
  --gr-section-inset: clamp(11px, calc(var(--gr-app-width) * .0349), 15px);
  --gr-page-title-size: 1.25rem;
  --gr-page-emblem-size: 36px;
  --gr-section-heading-size: 1.125rem;
  --gr-section-heading-weight: 650;
  --gr-search-height: max(40px, 2.5rem);
  --gr-search-text-size: .875rem;
  --gr-search-icon-size: 20px;
  --gr-pro-gutter: 16px;
  --gr-pro-tap: 44px;
  --gr-pro-nav-height: 62px;
  --gr-pro-ink: #17283a;
  --gr-pro-secondary: #3e5265;
  --gr-pro-muted: #526577;
  --gr-pro-brand: #203e60;
  --gr-pro-brand-hover: #142d47;
  --gr-pro-tint: #edf1f6;
  --gr-pro-canvas: #f3f5f7;
  --gr-pro-paper: #fffefd;
  --gr-pro-inset: #f7f8fa;
  --gr-pro-line: #dce3eb;
  --gr-pro-gold: #855321;
  --gr-pro-gold-tint: #f5ebdd;
  --gr-pro-night: #152536;
  --gr-pro-on-night: #f9fbff;
  --gr-pro-champagne: #eed7ac;
  --gr-pro-control: 11px;
  --gr-pro-card: 16px;
  --gr-pro-font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color-scheme: light;
}

html {
  -webkit-text-size-adjust: auto;
  text-size-adjust: auto;
}

html[data-gr-text-size="large"] { font-size: 125%; }

body,
#root {
  font-family: var(--gr-pro-font);
  color: var(--gr-pro-ink);
  background: var(--gr-pro-canvas);
}

#root > [code-path$="App.tsx:95:7"] {
  justify-content: center;
  background-color: #e8edf2;
}

#root [code-path$="App.tsx:96:9"] {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: var(--gr-pro-shell-width);
  min-height: 100dvh;
  background-color: var(--gr-pro-canvas);
  color: var(--gr-pro-ink);
}

#root [code-path$="App.tsx:96:9"] > .sticky.bottom-0 {
  margin-top: auto;
}

#root :is(button, a, input, select, textarea, [tabindex]):focus-visible,
#ganrao-test-login-entry:focus-visible,
#ganrao-demo-login-btn:focus-visible {
  outline: 2px solid var(--gr-pro-brand);
  outline-offset: 2px;
}

#root :is(
  [code-path$="Home.tsx:42:7"],
  [code-path$="ui.tsx:183:5"],
  [code-path$="ui.tsx:198:5"],
  [code-path$="Square.tsx:110:7"]
) {
  min-height: 56px;
  border-bottom: 1px solid var(--gr-pro-line);
  background: var(--gr-pro-paper) !important;
  color: var(--gr-pro-ink);
}

#root :is([code-path$="ui.tsx:189:7"], [code-path$="ui.tsx:200:7"]) {
  color: var(--gr-pro-ink) !important;
  font-weight: 700;
}

#root [code-path$="ui.tsx:183:5"] :is(svg[fill="#fff"], svg[fill="#ffffff"]) {
  fill: var(--gr-pro-brand);
}

#root [code-path$="ui.tsx:183:5"] :is(button, a, button .text-white, a .text-white) {
  color: var(--gr-pro-brand);
}

#root [code-path$="Home.tsx:42:7"] {
  min-height: calc(60px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 12px 0;
}

#root :is([code-path$="Home.tsx:43:9"], [code-path$="Home.tsx:49:9"]) {
  min-height: var(--gr-pro-tap);
  border-radius: var(--gr-pro-control);
}

#root [code-path$="Home.tsx:43:9"] {
  padding-inline: 4px;
}

#root [code-path$="Home.tsx:45:11"] {
  color: var(--gr-pro-secondary) !important;
  font-size: 0.8125rem;
}

#root :is([code-path$="Home.tsx:43:9"], [code-path$="Home.tsx:49:9"]) svg {
  fill: var(--gr-pro-brand);
}

.gr-original-identity {
  gap: 8px;
  color: var(--gr-pro-ink);
}

.gr-original-identity img {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
}

.gr-original-identity > span {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: .04em;
}

#root [code-path$="ui.tsx:172:5"] {
  min-height: var(--gr-pro-tap);
  border: 1px solid var(--gr-pro-line);
  border-radius: var(--gr-pro-control);
  background: var(--gr-pro-paper);
}

#root [code-path$="ui.tsx:174:7"] {
  min-width: 0;
  overflow: hidden;
  color: var(--gr-pro-muted) !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gr-original-home {
  background-color: var(--gr-pro-canvas);
}

.gr-original-home > [code-path$="ui.tsx:172:5"] {
  margin-block: 12px;
}

body:has(> #ganrao-test-login-entry) .gr-original-home > [code-path$="ui.tsx:172:5"] {
  margin-inline-end: 102px;
}

/* A single focal card with a real panoramic map, the existing enterprise count and one action. */
.gr-original-map-entry {
  --gr-map-copy-height: 114px;
  --gr-map-view-height: 152px;
  height: calc(var(--gr-map-copy-height) + var(--gr-map-view-height) + 2px);
  margin: 0 var(--gr-pro-gutter);
  border-color: #23394e;
  border-radius: 18px;
  background: var(--gr-pro-night);
}

.gr-original-map-open {
  height: 100%;
  background: var(--gr-pro-night);
}

.gr-original-map-copy {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--gr-map-copy-height);
  padding: 16px 100px 13px 17px;
  background: var(--gr-pro-night);
  clip-path: none;
  color: var(--gr-pro-on-night);
}

.gr-original-map-eyebrow {
  color: var(--gr-pro-champagne);
  font-size: 0.75rem;
  letter-spacing: .05em;
}

.gr-original-map-copy > strong {
  margin-top: 5px;
  color: var(--gr-pro-on-night);
  font-size: 1.8125rem;
  line-height: 1.24;
  letter-spacing: .015em;
}

.gr-original-map-address {
  margin-top: 6px;
  color: #d7e3f0;
  font-size: 0.75rem;
}

.gr-original-map-address > svg {
  color: var(--gr-pro-champagne);
}

.gr-original-map-link {
  position: absolute;
  top: calc(100% + var(--gr-map-view-height) - 58px);
  left: 12px;
  min-height: var(--gr-pro-tap);
  margin: 0;
  padding-inline: 12px;
  border-radius: 9px;
  background: var(--gr-pro-brand-hover);
  color: var(--gr-pro-on-night);
  font-size: 0.75rem;
  font-weight: 650;
}

.gr-original-map-link > svg {
  color: var(--gr-pro-champagne);
}

.gr-original-map-open:hover .gr-original-map-link,
.gr-original-map-open:active .gr-original-map-link {
  background: var(--gr-pro-gold);
}

#root .gr-original-map-open:focus-visible {
  outline-color: var(--gr-pro-champagne);
  outline-offset: -4px;
}

.gr-original-map-preview {
  top: var(--gr-map-copy-height);
  width: 100%;
  height: var(--gr-map-view-height);
  background: #dbe4e9;
}

.gr-original-preview-base,
.gr-original-preview-heat,
.gr-original-preview-overlay {
  height: 100%;
}

.gr-original-preview-base > rect {
  fill: #e9e9e4;
}

.gr-original-preview-water {
  fill: #b9d2e0;
}

.gr-original-preview-park {
  fill: #d0dbc8;
}

.gr-original-preview-heat {
  opacity: .78;
  filter: saturate(.65);
}

.gr-original-preview-overlay > circle {
  fill: #264d68;
  stroke: var(--gr-pro-paper);
}

.gr-original-map-badge {
  top: 17px;
  right: 13px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 63px;
  padding: 7px 9px;
  border: 1px solid #556273;
  border-radius: 9px;
  background: #22384d;
  color: var(--gr-pro-champagne);
}

.gr-original-map-badge strong {
  color: var(--gr-pro-on-night);
  font-size: 1.4375rem;
  line-height: 1;
}

.gr-original-map-badge > span {
  font-size: 0.6875rem;
}

.gr-original-preview-credit {
  right: 4px;
  bottom: 3px;
  background: var(--gr-pro-paper);
  color: var(--gr-pro-secondary);
}

.gr-enterprise-map-page,
.ganrao-splash {
  color: var(--gr-pro-ink);
  font-family: var(--gr-pro-font);
}

.gr-enterprise-map-page-header {
  border-bottom: 1px solid var(--gr-pro-line);
  background: var(--gr-pro-paper);
}

/* The existing shortcut cards retain their order and visual size as a pair. */
.gr-original-home > [code-path$="Home.tsx:72:7"] {
  gap: 10px;
  padding-block: 12px 9px;
}

.gr-original-home [code-path$="Home.tsx:77:11"] {
  min-width: 0;
  min-height: 76px;
  border: 1px solid var(--gr-pro-line);
  border-radius: var(--gr-pro-card);
  background: var(--gr-pro-paper) !important;
}

.gr-original-home [code-path$="Home.tsx:77:11"]:first-child {
  border-color: #cdd9e7;
  background: var(--gr-pro-tint) !important;
}

.gr-original-home [code-path$="Home.tsx:78:13"] {
  padding: 13px 12px;
}

.gr-original-home [code-path$="Home.tsx:79:15"] {
  padding-inline-end: 27px;
  color: var(--gr-pro-ink);
  font-size: 1rem;
  line-height: 1.45;
}

.gr-original-home [code-path$="Home.tsx:80:15"] {
  color: var(--gr-pro-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}

.gr-original-home [code-path$="Home.tsx:82:13"] {
  top: 12px;
  right: 10px;
  bottom: auto;
  width: 24px;
  height: 24px;
  background: transparent !important;
  color: var(--gr-pro-gold);
}

.gr-original-home [code-path$="Home.tsx:77:11"]:first-child [code-path$="Home.tsx:82:13"] {
  color: var(--gr-pro-brand);
}

.gr-original-home [code-path$="Home.tsx:82:13"] svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

#root :is(
  [code-path$="ui.tsx:338:5"],
  [code-path$="Home.tsx:118:7"],
  [code-path$="Home.tsx:146:13"],
  [code-path$="Home.tsx:165:11"],
  [code-path$="Activities.tsx:105:11"]
) {
  border: 1px solid var(--gr-pro-line);
  border-radius: var(--gr-pro-card);
  background: var(--gr-pro-paper);
}

#root [code-path$="ui.tsx:160:7"] {
  color: var(--gr-pro-ink) !important;
  font-size: 1.25rem;
  line-height: 1.35;
}

#root [code-path$="ui.tsx:163:9"] {
  display: flex;
  min-height: var(--gr-pro-tap);
  align-items: center;
  color: var(--gr-pro-brand) !important;
}

#root [code-path$="ui.tsx:338:5"] {
  padding: 15px;
}

#root [code-path$="ui.tsx:351:9"] {
  color: var(--gr-pro-ink) !important;
  font-size: 1rem;
  line-height: 1.45;
}

#root [code-path$="ui.tsx:353:7"] {
  color: var(--gr-pro-secondary) !important;
  line-height: 1.6;
}

#root :is([code-path$="ui.tsx:355:9"], [code-path$="ui.tsx:361:9"]) > * {
  max-width: calc((100% - 16px) / 3);
}

#root [code-path$="ui.tsx:367:7"] {
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--gr-pro-line);
  font-variant-numeric: tabular-nums;
}

#root [code-path$="ui.tsx:367:7"] > * {
  margin-inline-start: 0;
  white-space: nowrap;
}

#root :is([code-path$="Square.tsx:109:5"], [code-path$="Square.tsx:125:15"], [code-path$="Activities.tsx:52:5"]) {
  background-color: var(--gr-pro-canvas) !important;
}

#root [code-path$="Square.tsx:30:5"] {
  background: var(--gr-pro-paper);
  padding: 16px;
}

#root :is([code-path$="Square.tsx:112:11"], [code-path$="Activities.tsx:81:11"]) {
  min-height: var(--gr-pro-tap);
  border-bottom: 2px solid transparent;
  font-size: 0.875rem !important;
}

#root :is([code-path$="Square.tsx:112:11"], [code-path$="Activities.tsx:81:11"])[style*="font-weight: 700"] {
  border-bottom-color: var(--gr-pro-brand);
  color: var(--gr-pro-brand) !important;
}

#root [code-path$="Activities.tsx:57:7"] {
  margin: 10px 16px 12px;
  border: 1px solid var(--gr-pro-line);
  border-radius: var(--gr-pro-card);
  background: var(--gr-pro-paper);
}

#root [code-path$="Activities.tsx:63:17"] {
  min-width: 0;
  min-height: 56px;
}

#root [code-path$="Activities.tsx:63:17"] svg {
  width: 23px;
  height: 23px;
  fill: var(--gr-pro-brand);
}

#root [code-path$="Activities.tsx:63:17"]:has(span[style*="font-weight: 700"]) {
  background: var(--gr-pro-tint);
}

#root [code-path$="Activities.tsx:87:9"] {
  min-height: var(--gr-pro-tap);
  border: 1px solid var(--gr-pro-line);
  border-radius: var(--gr-pro-control);
}

#root :is([code-path$="Activities.tsx:109:17"], [code-path$="Home.tsx:124:17"], [code-path$="Home.tsx:152:17"]) {
  font-weight: 700;
}

#root [code-path$="ui.tsx:294:5"] {
  border-color: var(--gr-pro-line) !important;
  border-radius: var(--gr-pro-control);
  background: var(--gr-pro-inset);
  color: var(--gr-pro-ink);
  font-size: 1rem;
}

#root [code-path$="ui.tsx:294:5"]:focus {
  border-color: var(--gr-pro-brand) !important;
}

#root [code-path$="ui.tsx:304:5"] {
  border-radius: var(--gr-pro-control);
  background: var(--gr-pro-brand) !important;
  font-weight: 650;
}

#root [code-path$="ui.tsx:314:5"] {
  border-color: var(--gr-pro-line) !important;
  border-radius: var(--gr-pro-control);
}

/* Five fixed navigation targets, with space reserved for the phone's safe area. */
#root [code-path$="ui.tsx:405:5"] {
  z-index: 32;
  border-top-color: var(--gr-pro-line) !important;
  background: var(--gr-pro-paper);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

#root [code-path$="ui.tsx:409:11"] {
  min-width: 0;
  min-height: var(--gr-pro-nav-height);
  justify-content: center;
}

#root [code-path$="ui.tsx:409:11"] > span:first-child {
  width: 41px;
  height: 27px;
  border-radius: 9px;
}

#root [code-path$="ui.tsx:413:13"] {
  color: var(--gr-pro-muted) !important;
  font-size: 0.6875rem;
  font-weight: 500;
}

#root [code-path$="ui.tsx:409:11"]:has(> span:first-child[style*="251, 234, 236"]) > span:first-child {
  background: var(--gr-pro-tint) !important;
}

#root [code-path$="ui.tsx:409:11"]:has(> span:first-child[style*="251, 234, 236"]) svg {
  fill: var(--gr-pro-brand);
}

#root [code-path$="ui.tsx:409:11"]:has(> span:first-child[style*="251, 234, 236"]) [code-path$="ui.tsx:413:13"] {
  color: var(--gr-pro-brand) !important;
  font-weight: 700;
}

#root .fixed.bottom-24 {
  right: max(16px, calc((100% - var(--gr-pro-shell-width)) / 2 + 16px)) !important;
  bottom: calc(var(--gr-pro-nav-height) + env(safe-area-inset-bottom, 0px) + 12px) !important;
}

#ganrao-test-login-entry,
#ganrao-demo-login-btn {
  min-height: var(--gr-pro-tap);
  border: 1px solid var(--gr-pro-line) !important;
  border-radius: var(--gr-pro-control) !important;
  background: var(--gr-pro-paper) !important;
  color: var(--gr-pro-brand) !important;
  box-shadow: none !important;
  font: 600 12px var(--gr-pro-font) !important;
}

#ganrao-test-login-entry {
  right: max(16px, calc((100% - var(--gr-pro-shell-width)) / 2 + 16px)) !important;
}

body:has(.gr-original-home) #ganrao-test-login-entry {
  position: absolute !important;
  top: calc(72px + env(safe-area-inset-top, 0px));
  bottom: auto !important;
  padding-inline: 12px !important;
  z-index: 8 !important;
}

body:has(.gb-service-hero, input[aria-label="搜索名录"], nav[aria-label="工作台业务"]) #ganrao-test-login-entry {
  position: absolute !important;
  top: 7px;
  bottom: auto !important;
  padding-inline: 9px !important;
}

@media (max-width: 360px) {
  .gr-original-identity > span {
    font-size: 1.0625rem;
  }

  .gr-original-map-copy > strong {
    font-size: 1.625rem;
  }

  #root [code-path$="Activities.tsx:65:19"] {
    font-size: 0.6875rem;
  }
}

@media (hover: hover) {
  #root [code-path$="ui.tsx:304:5"]:hover:not(:disabled) {
    background: var(--gr-pro-brand-hover) !important;
  }

  #root [code-path$="ui.tsx:409:11"]:hover {
    background: var(--gr-pro-inset);
  }
}
