/* Private 07652: the existing engine supplies every displayed pillar. */
#screen-result.cdx-manse-ready > #pillars,
#screen-result.cdx-manse-ready > #pillars ~ .hint,
#screen-result.cdx-manse-ready > #cdxEasyIntro { display:none !important; }
/* 07755: the 오행 관계도 inside the 여덟 글자 card already shows the same counts as the old 오행 · 글자 구성 section. */
#screen-result.cdx-tier-ko:has(#cdxManse > .cg-map) > .sec.ri-section { display:none !important; }

#cdxManse.cm-root,
dialog.cm-dialog {
  --cm-ink:#332e27;
  --cm-muted:#6a6154;
  --cm-gold:#775a2a;
  --cm-line:#dfd3bf;
  --cm-paper:#fffdf8;
  color:var(--cm-ink);
  font-family:inherit;
  text-align:left;
  line-height:1.6;
  overflow-wrap:anywhere;
  -webkit-text-size-adjust:100%;
}
#cdxManse.cm-root { width:100%; min-width:0; margin:22px 0 24px; }
#cdxManse *,#cdxManse *::before,#cdxManse *::after,
dialog.cm-dialog *,dialog.cm-dialog *::before,dialog.cm-dialog *::after { box-sizing:border-box; }
#cdxManse [hidden],dialog.cm-dialog [hidden] { display:none !important; }
#cdxManse button,dialog.cm-dialog button {
  min-width:44px;
  min-height:44px;
  margin:0;
  font-family:inherit;
  font-size:14px;
  line-height:1.5;
  letter-spacing:normal;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
#cdxManse :is(button,summary):focus-visible,
dialog.cm-dialog :is(button,input,textarea):focus-visible {
  outline:3px solid #82602b;
  outline-offset:3px;
}
#cdxManse button:disabled,dialog.cm-dialog button:disabled { opacity:.55; cursor:default; }

#cdxManse .cm-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
#cdxManse .cm-head > div { min-width:0; }
#cdxManse .cm-eyebrow { color:var(--cm-gold); font-size:14px; font-weight:700; letter-spacing:.04em; }
#cdxManse .cm-head h2 { margin:3px 0 4px; color:var(--cm-ink); font-size:25px; font-weight:800; line-height:1.35; letter-spacing:-.04em; }
#cdxManse .cm-head p { margin:0; color:var(--cm-muted); font-size:14px; line-height:1.65; word-break:keep-all; }
#cdxManse .cm-share-open {
  flex:0 0 auto;
  max-width:96px;
  padding:10px 12px;
  border:1px solid #cdbb99;
  border-radius:12px;
  background:#f6eedf;
  color:#614920;
  font-weight:700;
}
#cdxManse .cm-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; width:100%; }
#cdxManse .cm-pillar {
  position:relative;
  min-width:0;
  margin:0;
  padding:13px 4px 10px;
  border:1px solid var(--cm-line);
  border-radius:15px;
  background:var(--cm-paper);
  text-align:center;
}
#cdxManse .cm-pillar--self { border:2px solid #b49860; padding:12px 3px 9px; background:#f8f0dd; box-shadow:0 3px 13px #7155240b; }
#cdxManse .cm-col-title { margin:0 0 6px; color:var(--cm-ink); font-size:15px; line-height:1.5; font-weight:700; white-space:nowrap; letter-spacing:-.04em; }
#cdxManse .cm-pillar--self .cm-col-title { color:#654b20; }
#cdxManse .cm-self-label { display:inline-block; margin-left:4px; padding:0 4px; border-radius:4px; background:#7c6132; color:#fff; font-size:11px; vertical-align:2px; }
#cdxManse button.cm-day-button { padding:0 2px; border:0; background:transparent; color:#765725; font-weight:700; text-decoration:underline dotted; text-underline-offset:4px; }
#cdxManse .cm-day-note p { margin:0; }
#cdxManse .cm-god { display:block; min-height:23px; margin:3px 0; color:var(--cm-muted); font-size:14px; line-height:1.6; letter-spacing:-.03em; }
#cdxManse button.cm-glyph {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  width:100%;
  min-height:88px;
  padding:7px 0;
  border:0;
  border-radius:11px;
  background:transparent;
  font-weight:700;
}
#cdxManse .cm-glyph .cm-hanja { display:block; font-family:"Noto Serif KR","Malgun Gothic",serif; font-size:38px; font-weight:700; line-height:1.2; }
#cdxManse .cm-glyph .cm-reading { display:block; color:var(--cm-muted); font-family:inherit; font-size:14px; font-weight:600; line-height:1.5; }
#cdxManse .cm-element-0 { color:#3e6650; }
#cdxManse .cm-element-1 { color:#a0473c; }
#cdxManse .cm-element-2 { color:#846125; }
#cdxManse .cm-element-3 { color:#606977; }
#cdxManse .cm-element-4 { color:#426283; }
#cdxManse button.cm-glyph { margin-top:5px; }
#cdxManse .cm-glyph.cm-element-0 { background:#e7f0e9; }
#cdxManse .cm-glyph.cm-element-1 { background:#fae7de; }
#cdxManse .cm-glyph.cm-element-2 { background:#f5ecd5; }
#cdxManse .cm-glyph.cm-element-3 { background:#eaecef; }
#cdxManse .cm-glyph.cm-element-4 { background:#e3edf6; }
#cdxManse .cm-unknown { display:flex; align-items:center; justify-content:center; min-height:186px; margin:0; color:#746b5d; font-size:14px; line-height:1.7; word-break:keep-all; }
#cdxManse .cm-day-note { margin:13px 1px 9px; color:#5d503a; font-size:14px; line-height:1.75; word-break:keep-all; }
#cdxManse .cm-legend { display:flex; flex-wrap:wrap; justify-content:center; gap:6px 13px; margin:12px 0 17px; }
#cdxManse .cm-legend span { display:inline-flex; align-items:center; gap:5px; font-size:14px; font-weight:600; line-height:1.6; }
#cdxManse .cm-legend span::before { content:""; width:7px; height:7px; flex:none; border-radius:50%; background:currentColor; }
#cdxManse .cm-hint { margin:10px 1px 0; color:var(--cm-muted); font-size:14px; line-height:1.75; word-break:keep-all; }

#cdxManse .cm-details { min-width:0; margin-top:14px; border:1px solid var(--cm-line); border-radius:14px; background:#fffdf8; }
#cdxManse .cm-details > summary { min-height:48px; margin:0; padding:12px 14px; color:#5c4826; font-size:14px; font-weight:700; line-height:1.65; cursor:pointer; }
#cdxManse .cm-details[open] > summary { border-bottom:1px solid var(--cm-line); }
#cdxManse .cm-detail-inner { min-width:0; padding:10px 6px 12px; }
#cdxManse .cm-detail-inner .sec { display:block !important; min-width:0; margin:0; padding:0; border:0; background:transparent; box-shadow:none; }
#cdxManse .cm-detail-inner .sec > :is(h2,h3,h4),
#cdxManse .cm-detail-inner .msnote { display:none !important; }
#cdxManse .cm-detail-inner .mswrap { width:100%; max-width:100%; min-width:0; overflow:visible; }
#cdxManse .cm-detail-inner table.mst { width:100%; min-width:0; margin:0; table-layout:fixed; border-collapse:collapse; text-align:center; font-size:14px; }
#cdxManse .mst :is(th,td) { height:auto; padding:7px 2px; border:1px solid #e3dacb; color:var(--cm-ink); white-space:normal !important; overflow-wrap:anywhere; word-break:normal; font-size:14px !important; line-height:1.65; }
#cdxManse .mst th { background:#f4eedf; font-weight:700; }
#cdxManse .mst :is(th,td):first-child { width:46px; color:#665537; background:#f4eedf; font-weight:700; font-size:14px !important; }
#cdxManse .mst td.mh { background:#f4eedf; color:#665537; font-size:14px !important; }
#cdxManse .mst td.big { font-size:25px !important; }
#cdxManse .mst :is(span,small,b,strong) { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
#cdxManse .mst small { font-size:14px !important; }
#cdxManse .mst .cm-term-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-width:44px;
  min-height:44px;
  padding:5px 1px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:inherit;
  font-size:14px;
  font-weight:inherit;
  line-height:1.65;
  white-space:normal;
  overflow-wrap:anywhere;
  text-decoration:underline dotted #b9a783;
  text-underline-offset:4px;
}

dialog.cm-dialog {
  width:min(480px,calc(100% - 24px));
  max-width:480px;
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  margin:auto;
  padding:19px 20px max(20px,env(safe-area-inset-bottom,0px));
  border:1px solid #d9c9ab;
  border-radius:22px;
  background:#fffcf6;
  box-shadow:0 20px 80px #29211538;
  font-family:system-ui,-apple-system,"Malgun Gothic",sans-serif;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
}
dialog.cm-dialog::backdrop { background:#261f18a3; }
dialog.cm-dialog .cm-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:15px; }
dialog.cm-dialog .cm-dialog-head h2 { margin:0; color:var(--cm-ink); font-size:21px; font-weight:800; line-height:1.4; letter-spacing:-.03em; }
dialog.cm-dialog .cm-close { flex:0 0 auto; padding:8px 11px; border:1px solid var(--cm-line); border-radius:11px; background:#f6f0e6; color:#65543a; font-weight:600; }
dialog.cm-dialog .cm-card-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-bottom:15px; }
dialog.cm-dialog .cm-card-options button { min-width:0; padding:10px 8px; border:1px solid #ded2bc; border-radius:11px; background:#fffdf8; color:var(--cm-muted); font-weight:700; }
dialog.cm-dialog .cm-card-options button[aria-pressed="true"] { border-color:#9a7b42; background:#eee1c5; color:#57401c; box-shadow:inset 0 0 0 1px #9a7b42; }
dialog.cm-dialog :is(.cm-question-row,.cm-nickname-row) { margin:12px 0; }
dialog.cm-dialog :is(.cm-question-row,.cm-nickname-row) label { display:block; margin-bottom:6px; color:#5a4e3c; font-size:14px; font-weight:700; line-height:1.6; }
dialog.cm-dialog :is(textarea,input) { display:block; width:100%; min-width:0; min-height:46px; margin:0; padding:11px 12px; border:1px solid #cfc2ad; border-radius:10px; color:var(--cm-ink); background:#fffefa; font-family:inherit; font-size:16px; line-height:1.6; }
dialog.cm-dialog textarea { min-height:86px; max-height:180px; resize:vertical; }
dialog.cm-dialog :is(textarea,input)::placeholder { color:#817767; opacity:1; }
dialog.cm-dialog img.cm-preview { display:block; width:auto; max-width:100%; height:auto; max-height:54vh; max-height:54dvh; margin:14px auto 12px; border:1px solid #e1d4bb; border-radius:14px; object-fit:contain; background:#fffdf8; box-shadow:0 5px 18px #5745250b; }
dialog.cm-dialog .cm-privacy-note { margin:10px 0 14px; color:var(--cm-muted); font-size:14px; line-height:1.7; word-break:keep-all; }
dialog.cm-dialog .cm-image-controls { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 0; }
dialog.cm-dialog .cm-image-controls button { flex:1 1 120px; padding:11px 12px; border:1px solid #cdbb99; border-radius:11px; color:#634a21; background:#f3ead8; font-weight:700; }
dialog.cm-dialog .cm-image-controls button:first-child { border-color:#6d5631; background:#6d5631; color:#fffdf8; }
dialog.cm-dialog .cm-status { min-height:23px; margin:10px 0 0; color:#62543e; font-size:14px; line-height:1.7; word-break:keep-all; }
dialog.cm-dialog .cm-status:empty { min-height:0; margin:0; }
dialog.cm-dialog .cm-mode-hint { margin:-5px 0 12px; font-size:14px; color:#6a6154; word-break:keep-all; }
dialog.cm-dialog .cm-extra-row { border:1px solid #e4d9c7; background:#f8f3e9; padding:11px 13px; border-radius:12px; margin:10px 0; }
dialog.cm-dialog .cm-extra-check { display:flex; align-items:center; gap:9px; min-height:30px; margin:0; cursor:pointer; font-weight:650; }
dialog.cm-dialog .cm-extra-check input { width:18px; height:18px; min-height:0; margin:0; padding:0; flex:none; accent-color:#775a2a; }
dialog.cm-dialog .cm-option-note { margin:4px 0 0; color:#786c5c; font-size:12px; line-height:1.6; word-break:keep-all; }
dialog.cm-dialog .cm-customize,dialog.cm-dialog .cm-image-text { margin:12px 0; }
dialog.cm-dialog .cm-customize summary,dialog.cm-dialog .cm-image-text summary { min-height:38px; padding:7px 0; font-size:14px; color:#71552b; cursor:pointer; }
dialog.cm-dialog .cm-customize label { margin-top:10px; }
dialog.cm-dialog .cm-transcript { font-size:13px; line-height:1.8; color:#6a6154; }
dialog.cm-dialog .cm-privacy-note { font-size:12px; line-height:1.65; }
dialog.cm-dialog img.cm-preview { max-height:none; width:100%; border-radius:10px; }
dialog.cm-dialog .cm-image-controls { position:sticky; bottom:-20px; margin-left:-5px; margin-right:-5px; padding:10px 5px; background:#fffcf6f5; backdrop-filter:blur(8px); border-top:1px solid #eee3d1; z-index:2; }
dialog.cm-dialog .cm-explanation h3 { margin:16px 0 8px; color:#5d4724; font-size:20px; line-height:1.5; }
dialog.cm-dialog.cm-explanation p { margin:10px 0; color:#50493f; font-size:16px; line-height:1.85; word-break:keep-all; }

@media (hover:hover) {
  #cdxManse .cm-glyph:hover,#cdxManse .cm-term-button:hover { background:#b59c6520; }
  #cdxManse .cm-share-open:hover,dialog.cm-dialog button:hover { filter:brightness(.96); }
}
@media (max-width:380px) {
  #cdxManse .cm-grid { gap:5px; }
  #cdxManse .cm-head { gap:8px; }
  #cdxManse .cm-head h2 { font-size:23px; }
  #cdxManse .cm-share-open { padding:9px; max-width:84px; }
  #cdxManse .cm-pillar { padding-right:2px; padding-left:2px; border-radius:12px; }
  #cdxManse .cm-pillar--self { padding-right:1px; padding-left:1px; }
  #cdxManse .cm-legend { gap:5px 10px; }
  #cdxManse .cm-detail-inner { padding-right:3px; padding-left:3px; }
  dialog.cm-dialog { padding:15px 14px max(18px,env(safe-area-inset-bottom,0px)); }
}
@media (prefers-reduced-motion:reduce) {
  #cdxManse *,dialog.cm-dialog * { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
