/* Shared card UX. Local styles do not alter other page buttons. */
.race-ux-card{position:relative;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease;min-width:0}
.race-ux-card h3 .race-card-primary{color:inherit;text-decoration:none}
.race-ux-card .race-card-primary::after{content:"";position:absolute;inset:0;border-radius:inherit;z-index:1}
.race-ux-card :is(.race-alert,.race-main-row,.race-secondary-row,.race-source-row .race-official,.card-bottom){position:relative;z-index:2}
.race-ux-card :is(a,button){touch-action:manipulation}
.race-ux-card :is(.race-detail-link,.race-official,.race-secondary-row a,.race-heart){white-space:nowrap;overflow-wrap:normal;font-family:inherit;line-height:1.4;box-sizing:border-box}
.race-ux-card .race-heart{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:1px solid #d8d1c5;border-radius:8px;background:#fff;color:#687186;cursor:pointer;font-size:25px;font-weight:400}
.race-ux-card .race-heart.is-saved{color:#ed572e}.race-heart:disabled{opacity:.6;cursor:wait}
.race-ux-card .race-alert{display:flex;align-items:center;gap:8px;border:1px solid #ffc7af;border-radius:9px;background:#fff2ea;color:#ac3e1c;padding:10px;font-size:12px;font-weight:700;line-height:1.5;margin:12px 0 0;text-decoration:none;min-height:44px}
.race-alert svg{width:17px;height:20px;flex:0 0 17px}.race-alert>span:first-of-type{min-width:0;overflow-wrap:anywhere}.race-alert>span:last-child{margin-left:auto;flex:0 0 auto}
.rw-home #koreanRaceCards .race-ux-card .race-card-footer{margin-top:auto;padding-top:14px;border-top:0}
.race-source-row{display:flex;align-items:center;justify-content:space-between;gap:6px;border-top:1px solid #e5e0d8;padding-top:8px;margin:0 0 10px;color:#747d8e}
.race-source-row small{font-size:10px;line-height:1.5}.race-source-row .race-official{font-size:11px;color:#58647b;text-decoration:none;font-weight:700;min-height:40px;display:flex;align-items:center}
.race-main-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px}
.rw-home #koreanRaceCards .race-main-row .race-detail-link{display:flex;align-items:center;justify-content:center;background:#13224a;color:#fff;border-radius:8px;padding:8px 6px;min-height:44px;font-size:14px;font-weight:700;text-decoration:none}
.race-secondary-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.rw-home #koreanRaceCards .race-secondary-row a{display:flex;align-items:center;justify-content:center;gap:0;margin:0;padding:8px 4px;border:1px solid #d8d1c5;border-radius:8px;background:#fff;color:#13224a;font-size:12px;font-weight:700;min-height:40px;text-decoration:none}
.rw-home #koreanRaceCards .race-source-row small,.rw-home #koreanRaceCards .race-local-date{display:block}
.race-ux-card .card-bottom{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:4px 6px;margin-top:auto;padding-top:12px}
.compact-card.race-ux-card .card-bottom .race-detail-link{font-size:13px;font-weight:700;color:#c14822;text-decoration:none;min-height:44px;display:flex;align-items:center}
.compact-card.race-ux-card .card-bottom .race-official{font-size:11px;color:#5e687b;text-decoration:none;min-height:40px;display:flex;align-items:center}
.compact-card.race-ux-card .race-heart{border:0;margin-left:auto}
.race-card-status{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);max-width:90vw;background:#13224a;color:#fff;border-radius:8px;padding:10px 16px;z-index:20;font-size:14px}.race-card-status:empty{display:none}
.race-ux-card :is(a,button):focus-visible{outline:3px solid #ff7a52;outline-offset:2px}
@media(hover:hover) and (pointer:fine){.race-ux-card:hover{transform:translateY(-3px);box-shadow:0 10px 25px #13224a16}.race-ux-card:hover .race-card-primary{text-decoration:underline;text-underline-offset:4px}}
@media(prefers-reduced-motion:reduce){.race-ux-card{transition:none}.race-ux-card:hover{transform:none}}
@media(max-width:650px){.rw-race-directory .race-grid{grid-template-columns:1fr}}
@media(max-width:380px){.rw-home #koreanRaceCards .race-main-row .race-detail-link{font-size:12px}.rw-home #koreanRaceCards .race-secondary-row a{font-size:10px}}

/* Stable two-line headings; dates must not absorb remaining card height. */
.rw-home #koreanRaceCards .race-ux-card h3,.compact-card.race-ux-card h3{line-height:1.4;block-size:2.8em;min-block-size:2.8em;max-block-size:2.8em;word-break:keep-all;overflow-wrap:anywhere}
.race-ux-card h3 .race-card-primary{display:block;line-height:inherit}
.race-ux-card .race-title-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.compact-card.race-ux-card>time{margin-top:0;line-height:1.4;min-block-size:2.8em}
.compact-card.race-ux-card .race-distance-note{display:block;font-size:11px;line-height:1.6;color:#747d8e;font-weight:400;margin:0 0 10px}
.rw-home #koreanRaceCards .race-ux-card .race-country{min-block-size:1.6em;line-height:1.6}
.rw-home #koreanRaceCards .race-ux-card .race-local-date{min-block-size:3.2em;line-height:1.6;margin-top:0;margin-bottom:12px}
.race-ux-card .race-logo-fallback{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;font-size:11px;font-weight:600;line-height:1.4;color:#747d8e}
.race-ux-card .race-heart-icon{width:24px;height:24px;fill:none;stroke:currentColor;pointer-events:none}
.race-ux-card .race-heart.is-saved .race-heart-icon{fill:currentColor}
.compact-card.race-ux-card .race-heart{min-width:44px;max-width:44px;min-height:44px;max-height:44px}

/* Confirmed status treatment, identical on desktop and mobile. */
.race-ux-card .race-entry-status,.rw-home #koreanRaceCards .race-ux-card .race-entry-status{display:flex;align-items:center;gap:7px;width:auto;max-width:100%;background:transparent;padding:0;border:0;border-radius:0;white-space:normal;font-size:14px;font-weight:600;line-height:1.6;color:#40506b;min-height:32px}
.race-ux-card .race-entry-status::before{content:"";display:block;width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#6c778b}
.race-ux-card .race-entry-status[data-entry-status=open]::before{background:#22805e}
.race-ux-card .race-entry-status[data-entry-status=upcoming]::before{background:#ed572e}
.race-ux-card .race-entry-status.cancelled{color:#a33030}
.race-ux-card .race-entry-status.cancelled::before{background:currentColor}
.rw-home #koreanRaceCards .race-ux-card .race-logo img.race-logo-fallback,.compact-card.race-ux-card .compact-top img.race-logo-fallback{width:24px;height:16px;max-width:24px;max-height:16px;padding:0;object-fit:contain;object-position:center}
.race-ux-card:has(:focus-visible),.rw-home #koreanRaceCards .race-ux-card:has(:focus-visible){outline:none}
.race-ux-card .race-card-primary:focus-visible{outline:none;text-decoration:underline;text-underline-offset:4px}

/* Keep Korean words intact in status and supporting copy. */
.race-ux-card .race-entry-status,.rw-home #koreanRaceCards .race-ux-card .race-entry-status,.race-ux-card .race-distance-note,.compact-card.race-ux-card>p{word-break:keep-all;overflow-wrap:normal}
/* Reserve the same two-line metadata row before every directory status. */
.compact-card.race-ux-card>p{line-height:1.6;min-block-size:3.2em}
.compact-card.race-ux-card .race-distance-note{margin:6px 0 10px}

/* Alternate entry uses the primary status's existing blank margin. */
.race-entry-summary{position:relative;display:flow-root}
.race-ux-card .race-other-entry{position:absolute;bottom:0;left:0;right:0;white-space:nowrap;line-height:18px;height:18px;font-size:11px;font-weight:500;color:#687186;letter-spacing:0}
.race-other-entry .is-open{color:#17634c;font-weight:700}.race-other-entry .is-unconfirmed{color:#687186}
.race-ux-card .race-entry-guide{position:relative;z-index:2;display:flex;align-items:center;height:20px;line-height:20px;font-size:11px;font-weight:700;text-decoration:none;color:#40506b;white-space:nowrap}
.rw-home #koreanRaceCards .race-ux-card:has(.race-entry-guide){padding-bottom:4px}
.rw-home #koreanRaceCards .race-ux-card:has(.race-entry-guide) .race-source-row{margin-bottom:6px}
.rw-home #koreanRaceCards .race-entry-summary:has(.race-other-entry)+.race-alert{margin-top:0}
@media(max-width:560px){.rw-home #koreanRaceCards .race-ux-card:has(.race-entry-guide){padding-bottom:2px}}
.compact-card .race-entry-summary:has(.race-other-entry) .race-entry-status{min-height:24px;margin-bottom:18px}
.compact-card.race-ux-card:has(.race-other-entry) .card-bottom{padding-top:2px}
.compact-card.race-ux-card:has(.race-entry-guide){padding-top:7px;padding-bottom:7px}
@media(max-width:650px){.compact-card.race-ux-card:has(.race-entry-guide){padding-top:3px;padding-bottom:3px}}
