/* The supplied Korean face is loaded from the local extension, with fallbacks. */
html:root {
  --title-font: "D2 Exocet", "Cinzel", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif;
}
html.d2s-ko-font-ready:root {
  --title-font: "D2S Korean", "D2 Exocet", "Cinzel", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

#d2s-ko-loading {
  position: fixed;
  z-index: 100;
  inset: max(12px, env(safe-area-inset-top)) 12px auto;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin-inline: auto;
  padding: 10px 14px;
  border: 1px solid #806b43;
  background: #14110b;
  color: #fff0cf;
  font: 16px/1.5 "D2S Korean", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  overflow-wrap: anywhere;
  text-align: center;
  pointer-events: none;
}
#d2s-ko-loading[hidden] { display: none; }
body.frontend-over-run #d2s-ko-loading,
body:has(#frontend.hidden) #d2s-ko-loading { display: none; }
#d2s-ko-loading .d2s-ko-loading-detail {
  margin-block-start: 3px;
  color: #d5c7a6;
  font-size: 14px;
}

#d2s-preload {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 32px 20px;
  box-sizing: border-box;
  background: #0d0b08;
  color: #fff0cf;
  font: 16px/1.6 "D2S Korean", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  text-align: center;
}
#d2s-preload[hidden] { display: none; }
#d2s-preload section { width: min(100%, 520px); }
#d2s-preload h1 { margin: 0 0 32px; color: #ddbf7b; font: inherit; font-size: 32px; }
#d2s-preload .preload-stage { margin: 0 0 20px; overflow-wrap: anywhere; }
#d2s-preload progress { display: block; width: 100%; height: 12px; accent-color: #c2a260; }
#d2s-preload .preload-count { margin: 12px 0 28px; font-variant-numeric: tabular-nums; }
#d2s-preload .preload-note { color: #c1b393; margin: 0; }
#d2s-preload .preload-actions { margin-top: 28px; }
#d2s-preload button {
  min-height: 44px;
  padding: 8px 22px;
  border: 1px solid #9b8350;
  border-radius: 0;
  background: #221b10;
  color: #fff0cf;
  font: inherit;
  cursor: pointer;
}
#d2s-preload button:hover { background: #382c19; }
#d2s-preload button:focus-visible { outline: 2px solid #f1d599; outline-offset: 4px; }
#d2s-preload button[hidden] { display: none; }
