:root { color-scheme: light; font-family: "Segoe UI", system-ui, sans-serif; color: #21332f; background: #f6f5ef; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; isolation: isolate; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url('/background.png') repeat; background-size: 792px 792px; opacity: .15; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
[hidden] { display: none !important; }
.shell { max-width: 1180px; margin: auto; padding: 0 40px; }
.quiet { border: 1px solid transparent; border-radius: 8px; color: #41554e; background: transparent; padding: 9px 12px; font-size: 14px; font-weight: 600; }
.quiet:hover { background: #e8eae0; }
:focus-visible { outline: 3px solid #237969; outline-offset: 4px; }
.intro { text-align: center; padding: 45px 0 32px; }
.eyebrow { font-size: 11px; letter-spacing: 2.8px; font-weight: 800; color: #687c70; margin: 0 0 14px; }
h1 { font-size: clamp(30px, 4.4vw, 49px); line-height: 1.15; font-weight: 750; letter-spacing: -1.8px; margin: 0 0 14px; }
.subtitle { color: #6a776e; font-size: 17px; margin: 0; }
.filters { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 0 0 22px; flex-wrap: wrap; }
.filter-field { display: flex; align-items: center; gap: 12px; max-width: 100%; }
.filters label { margin: 0; font-size: 13px; }
.filters select { max-width: 100%; min-width: 210px; padding: 10px 32px 10px 12px; border: 1px solid #ced6c7; border-radius: 8px; background: white; color: #21332f; }
.empty-state { border: 1px dashed #ced6c7; border-radius: 18px; padding: 70px 25px; text-align: center; color: #627062; line-height: 1.6; background: #ffffff80; }
.comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; position: relative; }
.set-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 0; text-align: left; color: #061c1c; background: white; border: 1px solid #e1e7e9; border-radius: 22px; box-shadow: 0 4px 20px #233c3210, 0 1px 4px #233c3208; transition: transform .18s, box-shadow .18s, border-color .18s; }
.set-card:not(:disabled):hover { transform: translateY(-4px); border-color: #b8cdc4; box-shadow: 0 12px 28px #263b2c18; }
.set-card:disabled { opacity: .7; }
.image-area { position: relative; width: 100%; flex: none; aspect-ratio: 1.4; padding: 20px; background: #fff; display: flex; align-items: center; justify-content: center; }
.set-image { position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); object-fit: contain; }
.image-placeholder { color: #7c897c; font-size: 14px; text-align: center; }
.set-info { width: 100%; flex: 1; border-top: 1px solid #e4e9eb; padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(82px, 24%); grid-template-rows: 1fr auto; align-items: center; gap: 18px 14px; min-height: 200px; }
.set-details { display: flex; flex-direction: column; min-width: 0; }
.set-theme { color: #637e6c; text-transform: uppercase; letter-spacing: 1.7px; font-size: 10px; font-weight: 750; margin-bottom: 10px; overflow-wrap: anywhere; }
.set-name { display: block; font-size: clamp(23px, 2.7vw, 30px); line-height: 1.15; font-weight: 800; letter-spacing: -.7px; margin-bottom: 10px; overflow-wrap: anywhere; }
.set-meta { color: #657571; font-size: 13px; line-height: 1.7; }
.set-statistics { min-width: 0; text-align: center; align-self: center; font-variant-numeric: tabular-nums; }
.voted-statistics { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.set-wins, .set-losses { font-size: 11px; line-height: 1.4; font-weight: 700; letter-spacing: .4px; color: #506a5e; overflow-wrap: anywhere; }
.set-percentage { font-size: clamp(28px, 3vw, 38px); line-height: 1.1; font-weight: 800; letter-spacing: -1px; color: #064d37; }
.first-vote { display: block; color: #506a5e; font-size: 12px; line-height: 1.6; font-weight: 750; letter-spacing: 1px; }
.choose { grid-column: 1 / -1; width: 100%; min-height: 48px; padding: 12px 17px; border-radius: 14px; background: #e6efeb; font-size: 17px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #064d37; }
.choose-chevron { font-size: 32px; line-height: .7; font-weight: 500; }
.set-card:not(:disabled):hover .choose { background: #dceae3; }
.versus { position: absolute; z-index: 1; left: 50%; top: clamp(90px, 17vw, 185px); transform: translate(-50%, -50%); background: #f6f5ef; border: 1px solid #dddfd4; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #8a917f; }
.below { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; min-height: 58px; gap: 12px; }
#progress { font-size: 12px; color: #758074; }
footer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; border-top: 1px solid #dedfd5; padding: 22px 0; color: #8a9183; font-size: 10px; line-height: 1.6; }
footer > span:last-child { text-align: right; }
.footer-brand { color: #21332f; font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: 2px; line-height: 1.2; text-align: center; text-decoration: none; }
.notice { background: #fff1ce; border: 1px solid #ead69d; padding: 12px 16px; border-radius: 9px; font-size: 13px; line-height: 1.5; margin-bottom: 18px; color: #70551d; }
dialog { width: min(500px, calc(100% - 32px)); padding: 28px; border: 1px solid #dce1d5; border-radius: 18px; color: #21332f; box-shadow: 0 25px 90px #18271f44; max-height: calc(100dvh - 40px); }
dialog::backdrop { background: #17271f66; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { font-size: 23px; letter-spacing: -.6px; margin: 0; }
dialog p { font-size: 13px; line-height: 1.6; color: #627062; }
dialog .storage-note { font-size: 11px; color: #7a8275; }
code { overflow-wrap: anywhere; }
label { display: block; font-size: 12px; font-weight: 650; margin-top: 14px; }
input { display: block; width: 100%; border: 1px solid #ced6c7; border-radius: 7px; padding: 10px 12px; margin-top: 6px; color: #21332f; background: #fff; }
.primary { background: #2b634d; color: #fff; border: none; padding: 13px 20px; border-radius: 8px; width: 100%; font-weight: 650; }
.primary:hover { background: #214e3c; }
.primary:disabled { opacity: .6; }
#settings-message { min-height: 20px; color: #8a4c28; }
@media (max-width: 640px) {
  .shell { padding: 0 20px; }
  .intro { padding: 35px 0 26px; } h1 { letter-spacing: -1px; } .subtitle { font-size: 14px; }
  .comparison { grid-template-columns: 1fr; gap: 26px; }
  .filters { gap: 12px; } .filter-field { width: 100%; max-width: 380px; } .filter-field label { width: 44px; } .filters select { flex: 1; min-width: 0; }
  .versus { top: 50%; } .set-info { min-height: 190px; padding: 18px; gap: 18px 12px; } .set-name { font-size: clamp(23px, 5vw, 30px); }
  footer { grid-template-columns: 1fr; text-align: center; gap: 14px; } footer > span:last-child { text-align: center; } dialog { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
