/* Shared, flat back affordance and site typography; November 2026. */
@import url("./fonts.css");

html:not([data-site-font-exception="maze"]) body,
html:not([data-site-font-exception="maze"]) body :is(h1,h2,h3,h4,h5,h6,p,a,button,input,select,textarea,label,small,strong,em,li,td,th,span):not(.fa):not(.fas):not(.far):not(.fab):not(.material-icons):not([class*="fa-"]) {
  font-family: var(--site-font, "KaiTi-CJK", "LXGW WenKai Lite", serif) !important;
}

/* Only actual page-exit controls receive this rule. In-game back/undo actions
   deliberately keep their own semantics and appearance. */
[data-site-back] {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  gap: 7px !important;
  min-width: 0 !important;
  width: auto !important;
  min-height: 36px !important;
  height: auto !important;
  max-width: min(42vw, 240px) !important;
  margin: 0 !important;
  padding: 7px 12px !important;
  border: 1px solid #b6cabb !important;
  border-radius: 8px !important;
  background: #fffdf5 !important;
  color: #315747 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.25 !important;
  font-family: var(--site-font, "KaiTi-CJK", "LXGW WenKai Lite", serif) !important;
  font-size: 0 !important; /* Hide legacy text arrows without deleting elements bound by scripts. */
  font-weight: 700 !important;
  cursor: pointer !important;
  transform: none !important;
  transition: background-color .15s ease, border-color .15s ease !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
}
[data-site-back]::before {
  content: "←";
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  font-family: var(--site-font, "KaiTi-CJK", "LXGW WenKai Lite", serif);
  font-weight: 700;
  flex: 0 0 auto;
}
[data-site-back] > :not(.site-back-caption):not(.site-back-short) {
  display: none !important;
}
[data-site-back] > .site-back-caption,
[data-site-back] > .site-back-short {
  display: inline-block !important;
  min-width: 0;
  max-width: 100%;
  color: inherit !important;
  font-family: var(--site-font, "KaiTi-CJK", "LXGW WenKai Lite", serif) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-site-back] > .site-back-short { display: none !important; }
[data-site-back]:hover,
[data-site-back]:focus-visible {
  background: #edf5e9 !important;
  border-color: #6f987d !important;
  color: #245a49 !important;
  box-shadow: none !important;
  transform: none !important;
}
[data-site-back]:focus-visible { outline: 2px solid #ba874c !important; outline-offset: 2px !important; }
[data-site-back]:active { background: #e3eee1 !important; transform: none !important; }
@media (max-width: 600px) {
  [data-site-back] { min-height: 34px !important; padding: 6px 9px !important; max-width: 90px !important; gap: 4px !important; }
  [data-site-back]::before { font-size: 17px; }
  [data-site-back] > .site-back-caption { display: none !important; }
  [data-site-back] > .site-back-short { display: inline-block !important; font-size: 13px !important; }
}
