/* Chart layout/interaction styles adapted directly from the user v3.5 prototype. */
details.pt > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 4px; margin: -4px; transition: background .2s; }
details.pt > summary::-webkit-details-marker { display: none; }
details.pt > summary .tag { flex-shrink: 0; margin-top: 2px; }
details.pt > summary .pt-t { flex: 1; min-width: 0; }
details.pt > summary .why-hint { flex-shrink: 0; font-size: .72rem; font-weight: 700; color: var(--faint); border: 1px solid var(--line2); border-radius: 999px; padding: 1px 8px; margin-top: 2px; }
details.pt[open] > summary .why-hint { color: color-mix(in srgb,var(--c3) 56%,var(--ink)); border-color: var(--c3); }
details.pt.is-linked > summary { background: color-mix(in srgb, var(--c2) 9%, transparent); box-shadow: inset 3px 0 0 var(--c2); }
details.pt .basis { margin-top: 8px; }
.chart-slot { border-radius: 18px; }
.chart-slot.flash { animation: chg .9s ease-out; }
.chart-cap { font-size: .84rem; color: var(--muted); line-height: 1.5; margin-top: 8px; }
/* 사주 원국(작게) */
.pm { display: flex; flex-direction: column; gap: 8px; }
.pm-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pm-col { display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: center; }
.pm-pl { font-size: .7rem; font-weight: 900; color: var(--muted); }
.pm-c { position: relative; z-index: 2; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.pm-c b { font-family: var(--body); font-size: 1.6em; line-height: 1.05; color: color-mix(in srgb, var(--el) 40%, var(--ink)); }
.pm-c small { font-size: .66rem; color: var(--muted); white-space: nowrap; }
.pm-c.is-sel { border: 2.5px solid var(--c2); background: var(--t-tarot); transform: translateY(-2px); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c2) 18%, transparent), 0 10px 22px color-mix(in srgb, var(--el) 30%, transparent); }
.pm-c.is-rel { border: 2px solid var(--c3); background: var(--soft); box-shadow: 0 0 18px color-mix(in srgb, var(--el) 35%, transparent); }
.pm-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.pm-lines path { fill: none; stroke: var(--c3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s ease-out forwards; opacity: .55; }
.pm-lines circle { fill: var(--c3); opacity: .35; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pm-els { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-e { height: 32px; padding: 0 11px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: .8rem; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.pm-e::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb,var(--el) 40%,var(--ink)); }
.pm-e.is-empty { border-style: dashed; color: var(--faint); }
.pm-e.is-sel { border: 2px solid var(--c2); background: var(--t-tarot); color: var(--ink); }
.pm-e.is-sel.is-empty { animation: chg 1.1s ease-out 2; }
/* 자미 명반(작게) */
.mm-grid { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 4px; aspect-ratio: 1.25; }
.mm-c { position: relative; z-index: 2; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 4px; display: flex; flex-direction: column; justify-content: center; gap: 1px; text-align: center; min-width: 0; overflow: hidden; color: var(--ink); }
.mm-c b { font-size: .72rem; }
.mm-c small { font-size: .62rem; color: var(--muted); line-height: 1.2; }
.mm-c.is-sel { border: 2.5px solid var(--c2); background: var(--t-tarot); }
.mm-c.is-rel { border: 2px solid var(--c3); background: var(--soft); }
.mm-c.is-opp { border: 2px dashed var(--c3); }
.mm-center { grid-column: 2 / 4; grid-row: 2 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 12px; background: var(--soft2); }
.mm-center b { position: relative; z-index: 3; font-family: var(--body); font-size: 1.15em; }
.mm-center span, .mm-center small { position: relative; z-index: 3; font-size: .72rem; color: var(--muted); }
.mm-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.mm-lines polygon, .mm-lines line { fill: none; stroke: var(--c2); stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: .7; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .8s ease-out forwards; }
.mm-lines line.opp { stroke-dasharray: 4 4; stroke-dashoffset: 0; animation: none; }
/* 서양 휠 */
.wm { display: flex; flex-direction: column; align-items: center; }
.wm-svg { width: min(100%, 300px); height: auto; }
.wm-svg .wh path { fill: var(--surface); stroke: var(--line2); stroke-width: 1; cursor: pointer; transition: fill .2s; }
.wm-svg .wh text { font-size: 0.6875rem; font-weight: 700; fill: var(--muted); pointer-events: none; }
.wm-svg .wh.is-sel path { fill: var(--t-tarot); stroke: var(--c2); stroke-width: 2.5; }
.wm-svg .wm-in { fill: var(--soft2); stroke: var(--line); }
.wm-svg .wb circle { fill: var(--t-western); stroke: var(--d-western); stroke-width: 1.5; cursor: pointer; }
.wm-svg .wb text { font-size: 0.9375rem; fill: var(--i-western); pointer-events: none; }
.wm-svg .wb.is-sel circle { fill: var(--i-western); stroke: var(--c2); stroke-width: 3; }
.wm-svg .wb.is-sel text { fill: var(--surface); }
.wm-svg .wa line { stroke: var(--c3); stroke-width: 2; cursor: pointer; }
.wm-svg .wa text { font-size: 0.6875rem; font-weight: 900; fill: color-mix(in srgb,var(--c3) 56%,var(--ink)); }
.wm-svg .wa.is-sel line { stroke: var(--c2); stroke-width: 4; }
.wm-svg .wm-mc { font-size: 0.6875rem; font-weight: 900; fill: var(--muted); }
.wm-els { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: .78rem; color: var(--muted); }
.wm-els span { padding: 2px 8px; border-radius: 999px; background: var(--soft); }
/* 타로·주역 작은 그림 */
.cm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cm-c { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1.5px solid var(--line2); background: var(--surface); color: var(--ink); text-align: center; }
.cm-c b { font-family: var(--body); font-size: 1.4em; }
.cm-c b.rev { transform: rotate(180deg); }
.cm-c span { font-size: .78rem; line-height: 1.3; }
.cm-c.is-sel { border: 2.5px solid var(--c2); background: var(--t-tarot); }
.hx2 { display: flex; align-items: center; justify-content: center; gap: 12px; }
.hm { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--line2); background: var(--surface); color: var(--ink); }
.hm.is-sel { border: 2.5px solid var(--c2); background: var(--t-tarot); }
.hm-lines { display: flex; flex-direction: column; gap: 5px; width: 74px; }
.hm-lines i { height: 8px; border-radius: 3px; background: var(--ink); position: relative; }
.hm-lines i.n { background: linear-gradient(90deg, var(--ink) 0 42%, transparent 42% 58%, var(--ink) 58% 100%); }
.hm-lines i.mv { box-shadow: 0 0 0 2px var(--c2); }

/* The live app keeps legible labels without dropping chart content. */
.v35-chart-sheet {display:flex;flex-direction:column;gap:14px;min-width:0;max-width:100%;color:var(--ink);overflow-wrap:anywhere;}
.v35-chart-sheet * {box-sizing:border-box;}
.v35-chart-sheet-head {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.v35-chart-sheet-head h2 {margin:0;font-family:var(--display);font-size:1.25rem;}
.v35-chart-save {min-height:44px;border:1px solid var(--line2);border-radius:12px;background:var(--surface);color:var(--ink);padding:7px 12px;}
.v35-chart-headline {font-family:var(--display);font-size:1.2rem;line-height:1.5;}
.v35-chart-points {display:flex;flex-direction:column;gap:12px;}
.v35-chart-sheet details.pt {border:1px solid var(--line);border-radius:16px;padding:12px;scroll-margin-top:var(--header-offset,80px);}
.v35-chart-sheet .basis {display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:14px;background:var(--soft2);}
.v35-chart-sheet .basis>div {display:grid;grid-template-columns:5.5rem minmax(0,1fr);gap:8px;}
.v35-chart-sheet .basis b {font-size:.875rem;color:var(--muted);}
.v35-chart-sheet .basis span {font-size:.95rem;line-height:1.6;}
.v35-chart-sheet .pt-t {font-size:1rem;}
.v35-chart-sheet .why-hint {font-size:.875rem;}
.v35-chart-sheet .tag {font-size:.875rem;flex-shrink:0;}
.v35-chart-sheet .chart-cap {font-size:.875rem;}
.v35-diagram {min-width:0;max-width:100%;}
.v35-zodiac {width:100%;height:auto;display:block;overflow:visible;}
.v35-diagram-missing {border:1px dashed var(--line2);border-radius:16px;padding:18px;color:var(--muted);font-size:1rem;}
.v35-chart-sheet .pm-c small {font-size:.875rem;white-space:normal;}
.v35-chart-sheet .pm-pl {font-size:.875rem;}
.v35-chart-sheet .pm-c.is-missing {border-style:dashed;color:var(--muted);justify-content:center;}
.v35-chart-sheet .pm-c.is-missing b {color:var(--faint);}
.v35-chart-sheet .pm-e {height:auto;min-height:36px;font-size:.875rem;}
.v35-chart-sheet .mm-grid {aspect-ratio:auto;grid-template-rows:repeat(4,minmax(70px,auto));}
.v35-chart-sheet .mm-c {min-height:70px;padding:6px 2px;}
.v35-chart-sheet .mm-c b {font-size:.875rem;}
.v35-chart-sheet .mm-c small {font-size:.875rem;overflow-wrap:anywhere;}
.v35-chart-sheet .mm-center small {font-size:.875rem;}
.v35-chart-sheet .mm-center b {font-size:1rem;}
.v35-chart-sheet .mm-lines {width:100%;height:100%;pointer-events:none;}
.v35-chart-sheet .mm-lines polygon,.v35-chart-sheet .mm-lines line {fill:none;stroke:var(--c2);stroke-width:1.5;vector-effect:non-scaling-stroke;}
.v35-chart-sheet .mm-lines .opp {stroke-dasharray:4 4;}
.v35-chart-sheet .wm-svg {width:100%;max-width:360px;height:auto;display:block;margin:auto;}
.v35-chart-sheet .wm-svg .wh text {font-size:0.875rem;}
.v35-chart-sheet .wm-svg .wa text,.v35-chart-sheet .wm-svg .wm-mc {font-size:0.875rem;}
.v35-chart-sheet .wm-svg [role=button]:focus-visible {outline:2px solid var(--c3);}
.v35-chart-sheet .cm {grid-template-columns:repeat(3,minmax(0,1fr));}
.v35-chart-sheet .cm-c span {font-size:.875rem;overflow-wrap:anywhere;}
.v35-chart-sheet .tc-img {width:100%;max-width:150px;object-fit:contain;border-radius:8px;}
.v35-chart-sheet .tc-img.rev {transform:rotate(180deg);}
.v35-chart-sheet .hm {padding:10px 6px;min-width:0;flex:1;max-width:160px;}
.v35-chart-sheet .hm-heading {background:none;border:0;color:inherit;font-size:.875rem;min-height:44px;padding:0 2px;}
.v35-chart-sheet .hm-heading.is-sel {color:var(--c2);font-weight:700;}
.v35-chart-sheet .hm-lines {max-width:100%;width:90px;gap:8px;}
.v35-chart-sheet .hm-line {display:block;width:100%;height:14px;border:0;padding:0;border-radius:3px;background:var(--ink);}
.v35-chart-sheet .hm-line.n {background:linear-gradient(90deg,var(--ink) 0 42%,transparent 42% 58%,var(--ink) 58% 100%);}
.v35-chart-sheet .hm-line.mv {outline:2px solid var(--c3);outline-offset:2px;}
.v35-chart-sheet .hm-line.is-sel,.v35-chart-sheet .hm-line.is-rel {box-shadow:0 0 0 4px color-mix(in srgb,var(--c2) 50%,transparent);}
.v35-chart-materials {align-self:flex-end;border:0;background:none;color:var(--muted);text-decoration:underline;font-size:.875rem;min-height:44px;padding:8px;}
.v35-chart-held {display:flex;flex-direction:column;gap:10px;border:1px dashed var(--line2);border-radius:14px;padding:12px;font-size:.875rem;line-height:1.6;color:var(--muted);overflow-wrap:anywhere;}
.v35-chart-held p {margin:3px 0;}
.v35-held-title {min-height:44px;background:none;border:0;padding:4px 0;text-align:left;color:var(--ink);font-weight:700;font-size:.875rem;}
.v35-chart-sheet .mm-c.has-held-star {border-style:dashed;}
@media(max-width:360px){.v35-chart-sheet .pm-grid{gap:5px}.v35-chart-sheet .basis>div{grid-template-columns:1fr;gap:2px}.v35-chart-sheet .cm{gap:5px}.v35-chart-sheet .mm-c small{font-size:.875rem}.v35-chart-sheet .hx2{gap:8px}}
@media(prefers-reduced-motion:reduce){.v35-chart-sheet *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
:root[data-motion=off] .v35-chart-sheet *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.wm-sign-list{margin:12px 0;width:100%}
.wm-sign-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line,#ddd)}
.wm-sign-row dt,.wm-sign-row dd{margin:0}
.wm-sign-row dd{text-align:right;overflow-wrap:anywhere}
.wm-sign-name{font:inherit;color:inherit;border:0;background:transparent;padding:4px;cursor:pointer}
.wm-sign-name.is-sel{color:var(--accent,#10a37f);font-weight:700}
/* v60 D2 괘 뜻 한 줄: the response's sentence under each hexagram. */
.hm-meaning { max-width: 140px; font-size: 0.78125rem; line-height: 1.45; text-align: center; color: var(--muted); overflow-wrap: anywhere; }
