/* v8 market layout over v6/v7. Native stones, input and detail text stay native. */
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root:is([data-screen='market'], [data-screen='work'], [data-screen='grand'], [data-screen='inspect']) :is(#stage, #app:not(.on) #stage, #app.fold #stage) {
  left: 32px; top: 64px; width: 500px; height: 352px;
}

/* Observation modes sit below the stone rather than covering its surface. */
html.activity-theme.igg-skin.feicui-ui.playable-v6 #inspection-toolbar {
  left: 44px; top: 428px; width: 476px; height: 38px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #inspection-toolbar [data-inspect-tool] {
  height: 38px; min-height: 38px; padding: 0 12px 1px;
  border-radius: 8px; font-size: 17px; line-height: 36px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #inspection-toolbar [data-inspect-tool]::before {
  border-width: 1px 22px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #inspection-toolbar .inspection-help,
html.activity-theme.igg-skin.feicui-ui.playable-v6 #inspection-feedback,
html.activity-theme.igg-skin.feicui-ui.playable-v6 #fc-stage-label {
  display: none !important;
}

/* Refresh is a single native action at the top right of the market stage. */
html.activity-theme.igg-skin.feicui-ui.playable-v6 #market-refresh {
  position: absolute; isolation: isolate; left: 376px; top: 76px; z-index: 9;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; width: 144px; height: 52px; min-height: 52px; margin: 0; padding: 3px 10px 4px;
  box-sizing: border-box; border: 0; border-radius: 9px; background: transparent; box-shadow: none;
  color: #fff9e8; font: inherit; font-size: 19px; font-weight: 850; line-height: 24px;
  text-shadow: -1px -1px 0 #9b661c, 1px -1px 0 #9b661c, -1px 1px 0 #9b661c, 1px 1px 0 #9b661c;
  white-space: nowrap; cursor: pointer; pointer-events: auto; touch-action: manipulation;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #market-refresh::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  box-sizing: border-box; border: solid transparent; border-width: 1px 22px;
  border-image: url('./assets/igg/btn-confirm.png') 1 45 fill stretch;
  background: none; opacity: 1; pointer-events: none;
  filter: drop-shadow(0 2px 1px #8b622b29);
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #market-refresh > span {
  display: block; font-size: 19px; line-height: 24px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #market-refresh > small {
  display: block; margin: 0; color: #fff8df; font-size: 12px; font-weight: 750; line-height: 16px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #market-refresh:not(:disabled):hover::before {
  filter: brightness(1.06) drop-shadow(0 2px 1px #8b622b29);
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #market-refresh:not(:disabled):active {
  transform: translateY(1px);
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #market-refresh:disabled {
  opacity: .55; cursor: default; filter: grayscale(.7);
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #market-refresh[hidden],
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root:not([data-screen='market']) #market-refresh,
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root:is([data-fc-page='home'], [data-fc-page='growth'], [data-fc-page='areas'], [data-fc-page='hub']) #market-refresh {
  display: none !important;
}

/* Only the two arrows take pointer input; the centre stays available for the stone. */
html.activity-theme.igg-skin.feicui-ui.playable-v6 #fc-stage-controls {
  left: 44px; top: 220px; width: 476px; height: 40px; z-index: 8;
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 0; align-items: center; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  pointer-events: none;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #fc-stage-controls button {
  position: relative; isolation: isolate; width: 40px; height: 40px; min-height: 40px;
  margin: 0; padding: 0 0 3px; border: 0; border-radius: 9px;
  color: #7e6134; background: transparent; box-shadow: none;
  font-size: 30px; font-weight: 800; line-height: 36px;
  text-shadow: 0 1px 0 #fff9e8; pointer-events: auto; touch-action: manipulation;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #fc-stage-controls button:first-of-type { grid-column: 1; }
html.activity-theme.igg-skin.feicui-ui.playable-v6 #fc-stage-controls button:last-of-type { grid-column: 3; }
html.activity-theme.igg-skin.feicui-ui.playable-v6 #fc-stage-controls button::before {
  content: ''; display: block; position: absolute; inset: 0; z-index: -1;
  box-sizing: border-box; border: solid transparent; border-width: 1px 10px;
  border-image: url('./assets/igg/btn-cancel.png') 1 45 fill stretch;
  background: none; opacity: .95; pointer-events: none;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #fc-stage-controls button:not(:disabled):hover {
  background: transparent;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #fc-stage-controls button:not(:disabled):hover::before { filter: brightness(1.06); }
html.activity-theme.igg-skin.feicui-ui.playable-v6 :is(#market-refresh, #fc-stage-controls button):focus-visible {
  outline: 2px solid #94631f; outline-offset: 2px; box-shadow: 0 0 0 3px #fff5d9;
}

/* The purchase action keeps its original large button, with no duplicate refresh. */
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel #activity-footer {
  flex: 0 0 66px; height: 66px; min-height: 66px; max-height: 66px;
  padding: 9px 16px 10px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #activity-secondary {
  display: none !important;
}

/* Real clues and origin notes remain in the stone card, with no clipping. */
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner {
  display: flex; flex-direction: column; flex: 1 1 auto; gap: 0;
  min-height: 0; height: auto; max-height: none; padding: 10px 12px;
  overflow-x: hidden; overflow-y: auto;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] .fc-market-home {
  display: flex; flex-direction: column; flex: 0 0 auto; gap: 8px; min-height: 0;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] .fc-market-growth {
  flex: 0 0 90px; height: 90px; min-height: 90px; padding: 6px 10px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] .fc-growth-kicker {
  min-height: 14px; font-size: 12px; line-height: 14px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] .fc-growth-kicker :is(button, a) {
  font-size: 11px; line-height: 14px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] .fc-growth-title {
  margin-top: 1px; font-size: 14px; line-height: 18px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] .fc-market-growth .fc-meter {
  height: 6px; margin-top: 4px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] .fc-growth-numbers {
  margin-top: 1px; font-size: 11px; line-height: 13px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] .fc-growth-gap {
  margin-top: 1px; font-size: 11px; line-height: 13px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner .stone-card {
  flex: 0 0 auto; height: auto; min-height: 0; max-height: none; margin: 0; padding: 12px;
  overflow: visible;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner .stone-card .sc-top {
  gap: 8px; align-items: baseline;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner .stone-card .sc-name {
  font-size: 17px; line-height: 24px; white-space: normal; overflow: visible; overflow-wrap: anywhere;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner .stone-card .sc-w {
  margin-left: 0; font-size: 12px; line-height: 24px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner .stone-card .tags {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; padding: 0;
  height: auto; max-height: none; overflow: visible;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner .stone-card .tag {
  margin: 0; padding: 2px 7px; font-size: 11px; line-height: 15px;
  max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner .stone-card .sc-note {
  display: block; margin: 0; font-size: 12px; line-height: 17px;
  height: auto; max-height: none; overflow: visible; white-space: normal; overflow-wrap: anywhere;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner .stone-card .sc-bottom {
  margin-top: 8px;
}
html.activity-theme.igg-skin.feicui-ui.playable-v6 #root[data-screen='market'] #panel-inner .stone-card .dots {
  display: none;
}
