:root { --c2: #1f6f8b; --flirt: #c2527a; --heat: #b3341f; }
:root[data-theme="dark"] { --c2: #5db3d3; --flirt: #e5799f; --heat: #e0553f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --c2: #5db3d3; --flirt: #e5799f; --heat: #e0553f; }
}
.wrap.wide { max-width: 960px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.me { color: var(--accent); }
.other { color: var(--c2); }
.name { overflow-wrap: anywhere; }
.sec > h2 { margin-top: 0; }
.sec > .hint:first-of-type { margin-top: -.3em; }
.who-head h1 { overflow-wrap: anywhere; }
.chips-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font: .95rem system-ui, sans-serif; color: var(--muted); }
.chips-meta b { color: var(--ink); }

.verdict { display: grid; gap: 16px; }
.verdict .ring {
  --p: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0);
}
.verdict .ring > span {
  width: 86px; height: 86px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
  font: 800 2rem system-ui, sans-serif;
}
.verdict .ring small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.verdict h2 { margin: 0 0 .2em; }
.verdict .top { display: flex; gap: 16px; align-items: center; }
.quote { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--line); background: var(--bg); border-radius: 0 10px 10px 0; }
.quote.me { border-left-color: var(--accent); color: var(--ink); }
.quote.other { border-left-color: var(--c2); color: var(--ink); }
.quote q { quotes: "«" "»"; overflow-wrap: anywhere; }
.quote cite { display: block; font: .8rem system-ui, sans-serif; color: var(--muted); font-style: normal; margin-top: 2px; }

.duel { display: grid; gap: 12px; grid-template-columns: 1fr; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.tile h3 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tile .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile .pair > div { min-width: 0; }
.tile .val { font: 700 1.25rem/1.2 system-ui, sans-serif; overflow-wrap: anywhere; }
.tile .sub { font: .8rem/1.3 system-ui, sans-serif; color: var(--muted); overflow-wrap: anywhere; }
.tile .who { font: 600 .78rem system-ui, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .solo .val { font-size: 1.05rem; }

.cmp { margin: 14px 0; }
.cmp-h { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; font: .9rem system-ui, sans-serif; align-items: baseline; }
.cmp-h > span:first-child { text-align: left; color: var(--accent); font-weight: 700; }
.cmp-h > span:last-child { text-align: right; color: var(--c2); font-weight: 700; }
.cmp-h > b { font-weight: 600; text-align: center; color: var(--muted); }
.cmp-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); margin-top: 4px; }
.cmp-bar i { display: block; height: 100%; }
.cmp-bar i:first-child { background: var(--accent); }
.cmp-bar i:last-child { background: var(--c2); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font: .85rem system-ui, sans-serif; margin: 6px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.legend span > em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
.legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.flirt-note { margin-top: 12px; font: .92rem/1.45 system-ui, sans-serif; }

.heat-wrap { overflow-x: auto; }
.heat { display: grid; grid-template-columns: 2.4em repeat(24, minmax(10px, 1fr)); gap: 2px; font: .7rem system-ui, sans-serif; color: var(--muted); min-width: 300px; }
.heat .h { text-align: center; }
.heat .d { align-self: center; }
.heat .c { aspect-ratio: 1; border-radius: 3px; background: var(--heat); min-height: 10px; }
.heat .c.z { background: var(--line); opacity: .45; }

.trend svg { width: 100%; max-width: 560px; height: auto; display: block; }
.trend .grid { stroke: var(--line); stroke-width: 1; }
.trend text { fill: var(--muted); font: 10px system-ui, sans-serif; }
.trend .l-me { stroke: var(--accent); fill: none; stroke-width: 2.4; }
.trend .l-other { stroke: var(--c2); fill: none; stroke-width: 2.4; }
.trend .d-me { fill: var(--accent); }
.trend .d-other { fill: var(--c2); }
.trend .b-flirt { fill: var(--flirt); opacity: .35; }

.words { display: grid; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 2px 10px; font: .88rem system-ui, sans-serif; overflow-wrap: anywhere; }
.chips li b { color: var(--muted); font-weight: 600; margin-left: 4px; }
.chips.emo li { font-size: 1.05rem; }
.words h3 { overflow-wrap: anywhere; }

.flag { border-top: 1px solid var(--line); padding: 10px 0; }
.flag:first-of-type { border-top: 0; }
.flag h3 { margin: 0; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.flag .counts { font: .85rem system-ui, sans-serif; color: var(--muted); }
.empty { color: var(--muted); font: italic .95rem system-ui, sans-serif; }

.att { display: grid; gap: 16px; }
.att h3 { overflow-wrap: anywhere; }
.style { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 .85rem system-ui, sans-serif; text-transform: capitalize; }
.att .other .style { background: var(--c2); color: var(--surface); }
.score { display: grid; grid-template-columns: 7.5em 1fr 2.4em; gap: 8px; align-items: center; font: .82rem system-ui, sans-serif; margin: 4px 0; }
.score .bar { margin: 0; height: 8px; }
.score .bar > i { width: auto; transition: none; }
.caveat { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }

.photos { display: grid; gap: 12px; }
.photo { display: grid; gap: 10px; }
.shot { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px dashed var(--line); display: grid; place-items: center; text-align: center; color: var(--muted); font: .9rem system-ui, sans-serif; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(22px); transform: scale(1.1); }
.shot.shown img { filter: none; transform: none; }
.shot button { position: absolute; inset: 0; width: 100%; background: transparent; border: 0; color: #fff; font: 700 1rem system-ui, sans-serif; cursor: pointer; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.shot.shown button { display: none; }
.photo .meta { font: .8rem system-ui, sans-serif; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.signal { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; text-transform: capitalize; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.confirm { border: 2px solid var(--accent); border-radius: var(--radius); padding: 14px; margin-top: 12px; }
.confirm .actions { margin-top: 8px; }
.btn.danger { background: var(--accent); }
.done-msg { text-align: center; padding: 40px 0; }

@media (min-width: 760px) {
  .verdict { grid-template-columns: auto 1fr; align-items: start; gap: 24px; }
  .duel { grid-template-columns: 1fr 1fr 1fr; }
  .att, .words { grid-template-columns: 1fr 1fr; gap: 24px; }
  .photos { grid-template-columns: 1fr 1fr; }
  .tile.solo { grid-column: span 1; }
}
