/* Character cultivation shortcuts stay after the equipped kungfu in normal
   document flow. Existing page scrolling owns shorter screens. */
#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries {
  position:static;
  inset:auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-flow:row;
  grid-auto-rows:56px;
  gap:10px;
  width:calc(100% - 24px);
  max-width:408px;
  min-width:0;
  height:auto;
  margin:16px auto 4px;
  padding:0;
  align-content:start;
  align-self:start;
  flex:none;
  border:0;
  background:none;
  box-shadow:none;
}

#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries[hidden],
#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries .role-feature-entry-button[hidden] {
  display:none !important;
}

#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries .role-feature-entry-button {
  position:relative;
  inset:auto;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  min-width:0;
  max-width:none;
  height:56px;
  min-height:56px;
  margin:0;
  padding:8px 12px;
  box-sizing:border-box;
  border:1px solid #a99e6f;
  border-color:#a99e6f !important;
  border-radius:6px;
  background:var(--tc-slot-empty-art) center / 100% 100% no-repeat,#285c5c !important;
  box-shadow:inset 0 0 0 1px #c3cda02b !important;
  color:#eadcba !important;
  -webkit-text-fill-color:currentColor !important;
  text-shadow:0 1px #2d4a40;
  font:500 20px/26px KaiTi,STKaiti,SimSun,serif;
  cursor:pointer;
}

#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries .role-feature-entry-button strong {
  min-width:0;
  margin:0;
  color:inherit !important;
  -webkit-text-fill-color:currentColor !important;
  font:inherit;
  white-space:nowrap;
}

#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries .role-feature-entry-button::before {
  content:"";
  display:block;
  position:static;
  flex:0 0 26px;
  width:26px;
  height:26px;
  margin:0;
  padding:0;
  border:0;
  background:#e6d4a4;
  -webkit-mask:var(--g-entry-icon) center / contain no-repeat;
  mask:var(--g-entry-icon) center / contain no-repeat;
  filter:drop-shadow(0 1px #284b41);
}

#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries [data-cultivate-entry="companion"] {
  --g-entry-icon:var(--g-companion-icon);
}

#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries .role-feature-entry-button::after {
  content:none;
  position:absolute;
  inset:3px;
  width:auto;
  height:auto;
  border:1px solid #d5bd7833;
  border-radius:2px;
  background:none;
  box-shadow:none;
  pointer-events:none;
}

#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries .role-feature-entry-button:disabled {
  color:#52685f !important;
  background:#a9baab !important;
  border-color:#8fa190 !important;
  box-shadow:none !important;
  text-shadow:none;
  cursor:default;
}

#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries .role-feature-entry-button:disabled::before {
  background-color:#52685f;
  filter:none;
}

#game-root[data-active-page="attribute"] .attribute-panel .role-feature-entries .role-feature-entry-button:focus-visible {
  outline:2px solid #edcf88;
  outline-offset:3px;
}

/* Refined role icons: inline copies of assets/images/themes/g-icons/role-*.svg
   and settings.svg, so file:// builds render SVG masks without CORS failures. */
#game-root[data-active-page="attribute"] .role-feature-entries [data-cultivate-entry="companion"] {
  --g-companion-icon:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS42NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48Y2lyY2xlIGN4PSIxMS41IiBjeT0iMTQiIHI9IjYuNSIvPjxjaXJjbGUgY3g9IjIwLjUiIGN5PSIxNCIgcj0iNi41Ii8+PHBhdGggZD0iTTExIDIzcTUgNSAxMCAwTTE2IDIzdjVNOSA1bC0xLTJtMTUgMiAxLTIiLz48L3N2Zz4=');
}

#game-root[data-active-page="attribute"] .role-feature-entries [data-cultivate-entry="spiritBeast"] {
  --g-entry-icon:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS42NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cGF0aCBkPSJtNyAxMy0yLTggOCA0cTMtMSA2IDBsOC00LTIgOHE0IDEwLTkgMTVRMyAyMyA3IDEzWiIvPjxwYXRoIGQ9Im05IDE2IDQgMm0xMC0yLTQgMm0tMyA0djMiLz48cGF0aCBkPSJtMTQgMjEgMiAyIDItMloiIGZpbGw9ImN1cnJlbnRDb2xvciIgc3Ryb2tlPSJub25lIi8+PC9zdmc+');
}

#game-root[data-active-page="attribute"] .role-feature-entries [data-cultivate-entry="physique"] {
  --g-entry-icon:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS42NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxMSIvPjxwYXRoIGQ9Ik0xNiA1YTUuNSA1LjUgMCAwIDEgMCAxMSA1LjUgNS41IDAgMCAwIDAgMTEgMTEgMTEgMCAwIDAgMC0yMlpNMTcuNyAxMC41YTEuNyAxLjcgMCAxIDEtMy40IDAgMS43IDEuNyAwIDEgMSAzLjQgMFoiIGZpbGw9ImN1cnJlbnRDb2xvciIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9Im5vbmUiLz48Y2lyY2xlIGN4PSIxNiIgY3k9IjIxLjUiIHI9IjEuNyIgZmlsbD0iY3VycmVudENvbG9yIiBzdHJva2U9Im5vbmUiLz48L3N2Zz4=');
}

#game-root[data-active-page="attribute"] .role-feature-entries [data-cultivate-entry="artifact"] {
  --g-entry-icon:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS42NSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cGF0aCBkPSJNOSAxMGgxNE0xMSAxMHE1LTcgMTAgME05IDEzaDE0djZxMCA2LTcgNnQtNy02Wk05IDE0SDV2N2g0bTE0LTdoNHY3aC00TTEyIDI1bC0yIDRtMTAtNCAyIDRNMTIgMTdxNC0zIDggMG0tNyA0aDYiLz48Y2lyY2xlIGN4PSIxNiIgY3k9IjUiIHI9IjEuMiIgZmlsbD0iY3VycmVudENvbG9yIiBzdHJva2U9Im5vbmUiLz48L3N2Zz4=');
}

#game-root[data-active-page="cultivate"] .cultivate-entry-row [data-cultivate-entry="settings"] {
  --g-entry-icon:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0iY3VycmVudENvbG9yIj48cGF0aCBkPSJNMTIuMTczIDYuNzYxTDEzLjI0NCA2LjM4N0wxMy41MTkgMy4yMzlMMTguNDgxIDMuMjM5TDE4Ljc1NiA2LjM4N0wxOS44MjcgNi43NjFMMTkuODI3IDYuNzYxTDIwLjg0OCA3LjI1NEwyMy4yNyA1LjIyM0wyNi43NzcgOC43M0wyNC43NDYgMTEuMTUyTDI1LjIzOSAxMi4xNzNMMjUuMjM5IDEyLjE3M0wyNS42MTMgMTMuMjQ0TDI4Ljc2MSAxMy41MTlMMjguNzYxIDE4LjQ4MUwyNS42MTMgMTguNzU2TDI1LjIzOSAxOS44MjdMMjUuMjM5IDE5LjgyN0wyNC43NDYgMjAuODQ4TDI2Ljc3NyAyMy4yN0wyMy4yNyAyNi43NzdMMjAuODQ4IDI0Ljc0NkwxOS44MjcgMjUuMjM5TDE5LjgyNyAyNS4yMzlMMTguNzU2IDI1LjYxM0wxOC40ODEgMjguNzYxTDEzLjUxOSAyOC43NjFMMTMuMjQ0IDI1LjYxM0wxMi4xNzMgMjUuMjM5TDEyLjE3MyAyNS4yMzlMMTEuMTUyIDI0Ljc0Nkw4LjczIDI2Ljc3N0w1LjIyMyAyMy4yN0w3LjI1NCAyMC44NDhMNi43NjEgMTkuODI3TDYuNzYxIDE5LjgyN0w2LjM4NyAxOC43NTZMMy4yMzkgMTguNDgxTDMuMjM5IDEzLjUxOUw2LjM4NyAxMy4yNDRMNi43NjEgMTIuMTczTDYuNzYxIDEyLjE3M0w3LjI1NCAxMS4xNTJMNS4yMjMgOC43M0w4LjczIDUuMjIzTDExLjE1MiA3LjI1NEwxMi4xNzMgNi43NjFaIE0yMC4yNSAxNmE0LjI1IDQuMjUgMCAxIDEtOC41IDAgNC4yNSA0LjI1IDAgMSAxIDguNSAwWiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+');
}

/* Keep the eight home functions above the existing chat strip. Their two
   rows replace the previous three-row reservation without moving cultivation. */
#game-root[data-active-page="cultivate"] .cultivate-entry-row {
  top:calc(var(--game-base-height) - 205px);
  bottom:auto;
  left:16px;
  right:16px;
  width:auto;
  min-width:0;
  height:97px;
  max-height:97px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-flow:row;
  grid-auto-rows:44px;
  row-gap:9px;
  column-gap:5px;
  margin:0;
  padding:0;
  overflow:visible;
}

#game-root[data-active-page="cultivate"] .cultivate-entry-row[hidden] {
  display:none !important;
}

#game-root[data-active-page="cultivate"] .cultivate-entry-row [data-cultivate-entry="readingGuide"] {
  --g-entry-icon:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS44IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik03IDRoMTlsLTQgMjRIM1pNMTAgNCA2IDI4TTEzIDEwaDhtLTkgNWg4bS05IDVoNk0yNiA3bDIgMS00IDIySDYiLz48L3N2Zz4=');
}

#game-root[data-active-page="cultivate"] .cultivate-entry-row [data-cultivate-entry="readingGuide"] .cultivate-entry-red-dot {
  top:2px;
  right:4px;
  width:10px;
  height:10px;
  box-sizing:border-box;
  border:2px solid #f4e6bc;
  border-radius:50%;
  background:#b7372d;
  box-shadow:none;
  pointer-events:none;
}

#game-root[data-active-page="cultivate"] .cultivate-entry-row [data-cultivate-entry="readingGuide"]:not(.has-claimable) .cultivate-entry-red-dot {
  display:none;
}

/* Reduce the empty space around each activity icon, retaining its artwork. */
html[data-ui-theme="teal-cloud-a"] #game-root[data-active-page="cultivate"] .home-activity-shortcuts {
  gap:5px;
}

html[data-ui-theme="teal-cloud-a"] #game-root[data-active-page="cultivate"] .home-activity-shortcuts .home-activity-shortcut {
  flex:0 0 60px;
  width:60px;
  min-width:60px;
  max-width:60px;
  gap:2px;
}

html[data-ui-theme="teal-cloud-a"] #game-root[data-active-page="cultivate"] .home-activity-shortcuts .home-activity-icon {
  width:44px;
  height:44px;
}

html[data-ui-theme="teal-cloud-a"] #game-root[data-active-page="cultivate"] .home-activity-shortcuts .home-activity-name {
  font-size:13px !important;
  line-height:16px;
}
