/* =========================================================
   hit_ticket.css
   うまAI 共通：的中チケット演出
   対象例：
   - planner.html 保存プラン結果
   - history.html 的中結果
   - predictions.html 的中結果を見る
   - planner_analysis.html 好成績表示
   ========================================================= */

.umaai-hit-ticket {
  background:
    linear-gradient(135deg, rgba(26, 122, 60, 0.10) 0%, rgba(255, 255, 255, 0.96) 42%, rgba(253, 248, 225, 0.95) 100%);
  border: 2px solid var(--green);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(26, 122, 60, 0.14);
  color: var(--text);
  margin: 10px 8px 12px;
  overflow: hidden;
  position: relative;
}

.umaai-hit-ticket::before,
.umaai-hit-ticket::after {
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: 50%;
  content: "";
  height: 22px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  z-index: 2;
}

.umaai-hit-ticket::before {
  left: -13px;
}

.umaai-hit-ticket::after {
  right: -13px;
}

.umaai-hit-ticket-head {
  align-items: center;
  background: linear-gradient(90deg, var(--green) 0%, #2d9e57 100%);
  color: #fff;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 9px 12px;
}

.umaai-hit-ticket-title {
  align-items: center;
  display: flex;
  font-size: 14px;
  font-weight: 900;
  gap: 6px;
  line-height: 1.3;
}

.umaai-hit-ticket-mark {
  align-items: center;
  background: #fff;
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  min-width: 46px;
  padding: 3px 8px;
}

.umaai-hit-ticket-date {
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.umaai-hit-ticket-body {
  display: grid;
  gap: 0;
  padding: 0;
}

.umaai-hit-ticket-race {
  align-items: stretch;
  border-bottom: 1px dashed rgba(26, 122, 60, 0.35);
  display: grid;
  grid-template-columns: 74px 1fr;
  min-height: 54px;
}

.umaai-hit-ticket-venue {
  align-items: center;
  background: var(--green-light);
  border-right: 1px solid rgba(26, 122, 60, 0.25);
  color: var(--green);
  display: flex;
  flex-direction: column;
  font-weight: 900;
  justify-content: center;
  line-height: 1.15;
  padding: 6px 4px;
  text-align: center;
}

.umaai-hit-ticket-venue-name {
  font-size: 12px;
}

.umaai-hit-ticket-race-no {
  font-size: 22px;
  margin-top: 2px;
}

.umaai-hit-ticket-race-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px 10px;
}

.umaai-hit-ticket-race-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.umaai-hit-ticket-race-meta {
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 2px;
}

.umaai-hit-ticket-bet {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  border-bottom: 1px dashed rgba(26, 122, 60, 0.35);
}

.umaai-hit-ticket-kind {
  align-items: center;
  background: #f7fbf8;
  border-right: 1px solid rgba(26, 122, 60, 0.25);
  color: var(--green);
  display: flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  padding: 8px 4px;
  text-align: center;
}

.umaai-hit-ticket-combo {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 18px;
  font-weight: 900;
  gap: 8px;
  line-height: 1.35;
  min-height: 48px;
  padding: 8px 10px;
}

.umaai-hit-ticket-more {
  color: var(--gray-mid);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.umaai-ticket-popup .umaai-hit-ticket-combo {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.umaai-hit-ticket-combo-main {
  align-items: center;
  display: flex;
  gap: 8px;
}

.umaai-hit-ticket-payoff {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
}

.umaai-hit-ticket-money {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.umaai-hit-ticket-money-cell {
  border-right: 1px solid var(--gray-line);
  padding: 9px 4px;
  text-align: center;
}

.umaai-hit-ticket-money-cell:last-child {
  border-right: 0;
}

.umaai-hit-ticket-money-label {
  color: var(--gray-mid);
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.umaai-hit-ticket-money-value {
  color: var(--text);
  display: block;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  margin-top: 3px;
  white-space: nowrap;
}

.umaai-hit-ticket-money-value.win {
  color: var(--green);
}

.umaai-hit-ticket-money-value.plus {
  color: var(--red);
}

.umaai-ticket-popup .umaai-hit-ticket {
  background:
    repeating-linear-gradient(90deg, rgba(26, 122, 60, 0.08) 0 4px, rgba(255, 255, 255, 0.95) 4px 8px),
    linear-gradient(135deg, rgba(26, 122, 60, 0.10) 0%, rgba(255, 255, 255, 0.96) 42%, rgba(253, 248, 225, 0.95) 100%);
  border: 2px solid #222;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.umaai-ticket-popup .umaai-hit-ticket-race,
.umaai-ticket-popup .umaai-hit-ticket-money {
  border-top: 1px dashed rgba(0, 0, 0, 0.28);
}

.umaai-hit-ticket-comment {
  background: rgba(253, 248, 225, 0.65);
  border-top: 1px solid var(--gray-line);
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  padding: 8px 12px;
}

.umaai-hit-ticket-mini {
  border-width: 1px;
  margin: 8px 0;
}

.umaai-hit-ticket-mini .umaai-hit-ticket-head {
  padding: 7px 10px;
}

.umaai-hit-ticket-mini .umaai-hit-ticket-title {
  font-size: 13px;
}

.umaai-hit-ticket-mini .umaai-hit-ticket-combo {
  font-size: 15px;
  min-height: 42px;
}

.umaai-hit-ticket-mini .umaai-hit-ticket-money-value {
  font-size: 13px;
}

.umaai-ticket-popup .umaai-hit-ticket-head {
  padding: 6px 10px;
}

.umaai-ticket-popup .umaai-hit-ticket-title {
  font-size: 12px;
}

.umaai-ticket-popup .umaai-hit-ticket-race-name {
  font-size: 13px;
}

.umaai-ticket-popup .umaai-hit-ticket-money-cell {
  padding: 7px 3px;
}

.umaai-hit-ticket-hit {
  animation: umaaiHitTicketPop 420ms cubic-bezier(0.2, 1.2, 0.3, 1);
}

.race-stamp-layer {
  display: none;
}

.umaai-ticket-popup-source {
  display: none;
}

.umaai-ticket-popup {
  background: transparent;
  bottom: 0;
  display: none;
  left: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 9998;
}

.umaai-ticket-popup.show {
  display: block;
  pointer-events: auto;
}

.umaai-ticket-popup-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  left: 50%;
  max-width: 660px;
  min-height: auto;
  overflow: visible;
  padding: 0;
  pointer-events: auto;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(94vw, 660px);
}

.umaai-ticket-popup.show .umaai-ticket-popup-card {
  animation: umaaiTicketFloatUp 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.popup-baken-card {
  background:
    repeating-linear-gradient(90deg, rgba(179, 220, 177, 0.28) 0 5px, rgba(249, 252, 246, 0.96) 5px 10px),
    #f9fcf6;
  border: 2px solid #2b5b2f;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26);
  overflow: hidden;
  position: relative;
}

.popup-baken-head {
  align-items: center;
  background: #18843d;
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
}

.popup-baken-badge {
  background: #fff;
  border-radius: 999px;
  color: #18843d;
  font-size: 12px;
  font-weight: 900;
  padding: 2px 10px;
}

.popup-baken-date {
  font-size: 12px;
  font-weight: 700;
}

.popup-baken-body {
  display: grid;
  grid-template-columns: 108px 78px 1fr;
  min-height: 228px;
}

.popup-baken-venue {
  align-items: center;
  background: rgba(24, 132, 61, 0.16);
  border-right: 1px solid rgba(43, 91, 47, 0.32);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 8px;
  text-align: center;
}

.popup-baken-venue-name {
  color: #111;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

.popup-baken-rno {
  color: #111;
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  margin-top: 6px;
}

.popup-baken-kind {
  align-items: center;
  border-left: 1px solid rgba(43, 91, 47, 0.32);
  border-right: 2px solid #2b5b2f;
  color: #111;
  display: flex;
  font-size: 30px;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0.04em;
  padding: 12px 6px;
  writing-mode: vertical-rl;
}

.popup-baken-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px 14px 14px;
}

.popup-baken-title {
  border: 2px solid #111;
  color: #111;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  padding: 6px 10px;
  text-align: center;
}

.popup-baken-combo {
  align-items: center;
  color: #111;
  display: flex;
  flex: 1;
  font-size: 34px;
  font-weight: 900;
  justify-content: center;
  padding: 18px 0 10px;
}

.popup-baken-meta {
  color: #2b5b2f;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
  text-align: center;
}

.popup-baken-total {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
}

.popup-baken-total-cell {
  border-top: 1px solid rgba(43, 91, 47, 0.28);
  padding-top: 8px;
  text-align: center;
}

.popup-baken-total-cell .label {
  color: var(--gray-mid);
  display: block;
  font-size: 10px;
  font-weight: 700;
}

.popup-baken-total-cell .value {
  color: #111;
  display: block;
  font-size: 17px;
  font-weight: 900;
  margin-top: 2px;
  white-space: nowrap;
}

.popup-baken-stamp {
  border: 3px solid #d51635;
  bottom: 16px;
  color: #d51635;
  font-size: 20px;
  font-weight: 900;
  left: 50%;
  padding: 6px 16px;
  position: absolute;
  transform: translateX(-50%) rotate(-18deg);
}

.popup-baken-note {
  color: rgba(0, 0, 0, 0.56);
  font-size: 10px;
  font-weight: 700;
  padding: 0 0 8px;
  text-align: center;
}

.baken-image-popup-card {
  background: #fff;
  border: 1px solid #1b3b1b;
  container-type: inline-size;
}

.baken-image-popup-card .baken-image-preview {
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(90deg, rgba(40, 160, 40, 0.12) 0, rgba(40, 160, 40, 0.12) 4px, rgba(255, 255, 255, 0.65) 4px, rgba(255, 255, 255, 0.65) 9px);
  display: grid;
  grid-template-columns: 25.76cqw 13.64cqw minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.baken-image-popup-card .baken-image-left {
  padding: 2.73cqw 2.12cqw;
}

.baken-image-popup-card .baken-image-place {
  font-size: 5.45cqw;
  font-weight: 900;
  line-height: 1.2;
}

.baken-image-popup-card .baken-image-race {
  font-size: 4.24cqw;
  font-weight: 900;
  margin-top: 1.21cqw;
}

.baken-image-popup-card .baken-image-race strong {
  display: inline-block;
  font-size: 7.88cqw;
  line-height: 1;
  margin-right: 0.61cqw;
}

.baken-image-popup-card .baken-image-name {
  font-size: 3.18cqw;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 3.94cqw;
}

.baken-image-popup-card .baken-image-kind {
  align-items: center;
  border: max(1px, 0.3cqw) solid #111;
  box-sizing: border-box;
  display: flex;
  font-size: 5.15cqw;
  font-weight: 900;
  justify-content: center;
  line-height: 1.25;
  margin: 1.82cqw 0;
  overflow: hidden;
  position: relative;
  writing-mode: vertical-rl;
}

.baken-image-popup-card .baken-preview-umaren .baken-image-kind::before,
.baken-image-popup-card .baken-preview-umaren .baken-image-kind::after {
  align-items: center;
  content: "QUINELLA";
  display: flex;
  font-size: 1.97cqw;
  font-weight: 700;
  height: 5.15cqw;
  justify-content: center;
  left: 0;
  line-height: 1;
  position: absolute;
  width: 100%;
  writing-mode: horizontal-tb;
}

.baken-image-popup-card .baken-preview-umaren .baken-image-kind::before {
  top: 0.91cqw;
}

.baken-image-popup-card .baken-preview-umaren .baken-image-kind::after {
  bottom: 0.91cqw;
}

.baken-image-popup-card .baken-preview-umatan .baken-image-kind,
.baken-image-popup-card .baken-preview-sanrentan .baken-image-kind {
  background:
    linear-gradient(to bottom,
      #000 0,
      #000 17%,
      transparent 17%,
      transparent 83%,
      #000 83%,
      #000 100%);
  color: #111;
  text-orientation: upright;
}

.baken-image-popup-card .baken-preview-sanrenpuku .baken-image-kind {
  text-orientation: upright;
}

.baken-image-popup-card .baken-preview-umatan .baken-image-kind::before,
.baken-image-popup-card .baken-preview-umatan .baken-image-kind::after,
.baken-image-popup-card .baken-preview-sanrentan .baken-image-kind::before,
.baken-image-popup-card .baken-preview-sanrentan .baken-image-kind::after {
  align-items: center;
  color: #fff;
  content: "EXACTA";
  display: flex;
  font-size: 1.97cqw;
  font-weight: 900;
  height: 6.36cqw;
  justify-content: center;
  left: 0;
  line-height: 1;
  position: absolute;
  width: 100%;
  writing-mode: horizontal-tb;
}

.baken-image-popup-card .baken-preview-sanrentan .baken-image-kind::before,
.baken-image-popup-card .baken-preview-sanrentan .baken-image-kind::after {
  content: "TRIFECTA";
}

.baken-image-popup-card .baken-preview-umatan .baken-image-kind::before,
.baken-image-popup-card .baken-preview-sanrentan .baken-image-kind::before {
  top: 1.21cqw;
}

.baken-image-popup-card .baken-preview-umatan .baken-image-kind::after,
.baken-image-popup-card .baken-preview-sanrentan .baken-image-kind::after {
  bottom: 1.21cqw;
}

.baken-image-popup-card .baken-preview-sanrenpuku .baken-image-kind {
  text-orientation: upright !important;
  text-combine-upright: none !important;
}

.baken-image-popup-card .baken-preview-sanrenpuku .baken-image-kind::before,
.baken-image-popup-card .baken-preview-sanrenpuku .baken-image-kind::after {
  align-items: center;
  color: #111;
  content: "TRIO";
  display: flex;
  font-size: 1.97cqw;
  font-weight: 700;
  height: 5.15cqw;
  justify-content: center;
  left: 0;
  line-height: 1;
  position: absolute;
  width: 100%;
  writing-mode: horizontal-tb;
}

.baken-image-popup-card .baken-preview-sanrenpuku .baken-image-kind::before {
  top: 1.21cqw;
}

.baken-image-popup-card .baken-preview-sanrenpuku .baken-image-kind::after {
  bottom: 1.21cqw;
}

.baken-image-popup-card .baken-preview-fukusho .baken-image-kind,
.baken-image-popup-card .baken-preview-wide .baken-image-kind {
  background:
    linear-gradient(to bottom,
      transparent 0,
      transparent 34%,
      rgba(248, 255, 248, 0.92) 34%,
      rgba(248, 255, 248, 0.92) 66%,
      transparent 66%,
      transparent 100%),
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 0.45cqw,
      rgba(0, 0, 0, 0.45) 0.45cqw,
      rgba(0, 0, 0, 0.45) 0.76cqw);
}

.baken-image-popup-card .baken-preview-fukusho .baken-image-kind::before,
.baken-image-popup-card .baken-preview-fukusho .baken-image-kind::after,
.baken-image-popup-card .baken-preview-wide .baken-image-kind::before,
.baken-image-popup-card .baken-preview-wide .baken-image-kind::after {
  align-items: center;
  background: #111;
  color: #fff;
  content: "PLACE\A SHOW";
  display: flex;
  font-size: 1.97cqw;
  font-weight: 900;
  height: 7.27cqw;
  justify-content: center;
  left: 0;
  line-height: 1.15;
  position: absolute;
  text-align: center;
  white-space: pre;
  width: 100%;
  writing-mode: horizontal-tb;
}

.baken-image-popup-card .baken-preview-wide .baken-image-kind::before,
.baken-image-popup-card .baken-preview-wide .baken-image-kind::after {
  content: "QUINELLA\A PLACE";
}

.baken-image-popup-card .baken-preview-fukusho .baken-image-kind::before,
.baken-image-popup-card .baken-preview-wide .baken-image-kind::before {
  top: 0;
}

.baken-image-popup-card .baken-preview-fukusho .baken-image-kind::after,
.baken-image-popup-card .baken-preview-wide .baken-image-kind::after {
  bottom: 0;
}

.baken-image-popup-card .baken-preview-wakuren .baken-image-kind {
  background: #000;
  color: #fff;
}

.baken-image-popup-card .baken-preview-wakuren .baken-image-kind::before,
.baken-image-popup-card .baken-preview-wakuren .baken-image-kind::after {
  align-items: center;
  content: "BRACKET\A QUINELLA";
  display: flex;
  font-size: 1.97cqw;
  font-weight: 900;
  height: 6.97cqw;
  justify-content: center;
  left: 0;
  line-height: 1.15;
  position: absolute;
  text-align: center;
  white-space: pre;
  width: 100%;
  writing-mode: horizontal-tb;
}

.baken-image-popup-card .baken-preview-wakuren .baken-image-kind::before {
  top: 1.21cqw;
}

.baken-image-popup-card .baken-preview-wakuren .baken-image-kind::after {
  bottom: 1.21cqw;
}

.baken-image-popup-card .baken-image-main {
  padding: 2.12cqw;
  position: relative;
}

.baken-image-popup-card .baken-image-method {
  border: max(1px, 0.3cqw) solid #111;
  font-size: 4.55cqw;
  font-weight: 900;
  padding: 1.21cqw 1.82cqw;
  text-align: center;
}

.baken-image-popup-card .baken-image-combo {
  align-items: center;
  bottom: 14.2cqw;
  display: flex;
  flex-direction: column;
  font-size: 3.64cqw;
  font-weight: 900;
  justify-content: center;
  left: 2.12cqw;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  right: 2.12cqw;
  text-align: center;
  top: 8.8cqw;
  --ticket-combo-box: 7.7cqw;
  --ticket-combo-font: 4.3cqw;
  --ticket-combo-sep: 4.8cqw;
  --ticket-combo-gap: 1.6cqw;
  --ticket-combo-box-gap-x: 1.25cqw;
  --ticket-combo-box-gap-y: 1.05cqw;
}

.baken-image-popup-card .baken-image-combo:has(.baken-layout-single),
.baken-image-popup-card .baken-image-combo:has(.baken-layout-single-combo),
.baken-image-popup-card .baken-image-combo:has(.planner-single-combo),
.baken-image-popup-card .baken-image-combo:has(.baken-image-combo-line:nth-child(1):last-child) {
  --ticket-combo-box: 8.8cqw;
  --ticket-combo-font: 5.1cqw;
  --ticket-combo-sep: 5.6cqw;
  --ticket-combo-gap: 0;
}

.baken-image-popup-card .baken-image-combo:has(.baken-image-combo-line:nth-child(2):last-child) {
  --ticket-combo-box: 8.7cqw;
  --ticket-combo-font: 4.9cqw;
  --ticket-combo-sep: 5.3cqw;
  --ticket-combo-gap: 1.9cqw;
}

.baken-image-popup-card .baken-image-combo:has(.baken-image-combo-line:nth-child(3):last-child) {
  --ticket-combo-box: 7.7cqw;
  --ticket-combo-font: 4.3cqw;
  --ticket-combo-sep: 4.8cqw;
  --ticket-combo-gap: 1.6cqw;
}

.baken-image-popup-card .baken-image-combo:has(.baken-image-combo-line:nth-child(4):last-child) {
  --ticket-combo-box: 6.8cqw;
  --ticket-combo-font: 3.8cqw;
  --ticket-combo-sep: 4.2cqw;
  --ticket-combo-gap: 1.05cqw;
}

.baken-image-popup-card .baken-image-combo:has(.baken-image-combo-line:nth-child(5):last-child) {
  --ticket-combo-box: 6.1cqw;
  --ticket-combo-font: 3.4cqw;
  --ticket-combo-sep: 3.8cqw;
  --ticket-combo-gap: 0.65cqw;
}

.baken-image-popup-card .baken-image-combo:has(.baken-image-combo-line:nth-child(6):last-child) {
  --ticket-combo-box: 5.5cqw;
  --ticket-combo-font: 3.05cqw;
  --ticket-combo-sep: 3.4cqw;
  --ticket-combo-gap: 0.35cqw;
}

.baken-image-popup-card .baken-image-combo .baken-layout {
  justify-content: center;
  max-width: 100%;
  width: 100%;
}

.baken-image-popup-card .baken-image-combo .baken-layout-single,
.baken-image-popup-card .baken-image-combo .baken-layout-single-combo,
.baken-image-popup-card .baken-image-combo .planner-single-combo {
  align-items: center;
  display: flex !important;
  justify-content: center;
  width: 100%;
}

.baken-image-popup-card .baken-image-combo .baken-layout-single .baken-num-box,
.baken-image-popup-card .baken-image-combo .baken-layout-single-combo .baken-num-box,
.baken-image-popup-card .baken-image-combo .baken-layout-single .bet-num-box,
.baken-image-popup-card .baken-image-combo .baken-layout-single-combo .bet-num-box,
.baken-image-popup-card .baken-image-combo .planner-single-combo .planner-bet-num-box,
.baken-image-popup-card .baken-image-combo .planner-single-combo .planner-single-num-box {
  font-size: 5.1cqw !important;
  height: 8.8cqw !important;
  min-width: 8.8cqw !important;
  width: 8.8cqw !important;
}

.baken-image-popup-card .baken-image-combo .planner-single-combo .planner-single-horse-name {
  font-size: 4.1cqw !important;
  font-weight: 900 !important;
  margin-left: 1.4cqw !important;
}

.baken-image-popup-card .baken-image-combo .baken-image-combo-line+.baken-image-combo-line {
  margin-top: var(--ticket-combo-gap) !important;
}

.baken-image-popup-card .baken-image-combo .baken-layout-list {
  gap: var(--ticket-combo-gap) !important;
}

.baken-image-popup-card .baken-image-combo .baken-num-box,
.baken-image-popup-card .baken-image-combo .bet-num-box {
  font-size: var(--ticket-combo-font) !important;
  height: var(--ticket-combo-box) !important;
  min-width: var(--ticket-combo-box) !important;
  width: var(--ticket-combo-box) !important;
}

.baken-image-popup-card .baken-image-combo .baken-sep,
.baken-image-popup-card .baken-image-combo .bet-sep {
  font-size: var(--ticket-combo-sep) !important;
  height: var(--ticket-combo-box) !important;
  line-height: var(--ticket-combo-box) !important;
  margin: 0 1.15cqw !important;
}

.baken-image-popup-card .baken-preview-umatan .baken-image-combo .baken-sep,
.baken-image-popup-card .baken-preview-umatan .baken-image-combo .bet-sep {
  align-items: center !important;
  color: #111 !important;
  display: inline-flex !important;
  font-size: var(--ticket-combo-sep) !important;
  height: var(--ticket-combo-box) !important;
  justify-content: center !important;
  line-height: var(--ticket-combo-box) !important;
  margin: 0 1.15cqw !important;
  min-width: 6.4cqw !important;
  padding: 0 !important;
  width: 6.4cqw !important;
}

.baken-image-popup-card .baken-preview-umatan .baken-image-combo .baken-sep::before,
.baken-image-popup-card .baken-preview-umatan .baken-image-combo .baken-sep::after,
.baken-image-popup-card .baken-preview-umatan .baken-image-combo .bet-sep::before,
.baken-image-popup-card .baken-preview-umatan .baken-image-combo .bet-sep::after {
  content: none !important;
  display: none !important;
}

.baken-image-popup-card .baken-image-combo .baken-box-cell,
.baken-image-popup-card .baken-image-combo .baken-box-cell .baken-num-box {
  font-size: 3.75cqw !important;
  height: 6.6cqw !important;
  min-width: 6.6cqw !important;
  width: 6.6cqw !important;
}

.baken-image-popup-card .baken-image-combo .baken-layout-box-grid {
  gap: var(--ticket-combo-box-gap-y) var(--ticket-combo-box-gap-x) !important;
  grid-template-columns: repeat(5, 6.6cqw) !important;
  width: max-content !important;
}

.baken-image-popup-card .baken-image-combo .baken-layout-star {
  font-size: 3.95cqw !important;
  height: 6.6cqw !important;
  line-height: 6.6cqw !important;
  width: 6.6cqw !important;
}

.baken-image-popup-card .baken-image-count,
.baken-image-popup-card .baken-image-each,
.baken-image-popup-card .baken-image-total {
  font-size: 3.64cqw;
  font-weight: 900;
  line-height: 1.35;
  position: absolute;
  right: 5.76cqw;
  text-align: right;
}

.baken-image-popup-card .baken-image-count {
  bottom: 10cqw;
}

.baken-image-popup-card .baken-image-each {
  bottom: 5.45cqw;
}

.baken-image-popup-card .baken-image-total {
  bottom: 0.91cqw;
}

.baken-image-popup-card .baken-image-count span,
.baken-image-popup-card .baken-image-each span,
.baken-image-popup-card .baken-image-total span {
  display: inline-block;
  min-width: 14.55cqw;
}

@keyframes umaaiTicketFloatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -47%) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.race-stamp {
  align-items: center;
  background: transparent;
  border: 4px solid currentColor;
  box-shadow: none;
  box-sizing: border-box;
  display: inline-flex;
  font-size: 24px;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0.04em;
  line-height: 1;
  min-width: 118px;
  opacity: 0.88;
  padding: 10px 18px;
  position: relative;
  text-shadow:
    0.7px 0 currentColor,
    -0.5px 0 currentColor;
  transform: rotate(-15deg);
  white-space: nowrap;
}

.race-stamp.hit {
  color: #d51635;
}

.race-stamp.manbaken {
  color: #d39a00;
}

.race-stamp::before {
  border: 2px solid currentColor;
  content: "";
  inset: 3px;
  opacity: 0.45;
  pointer-events: none;
  position: absolute;
}

.umaai-ticket-popup .umaai-ticket-popup-stamps {
  margin: 8px 0 2px;
}

.umaai-ticket-popup .race-stamp {
  border-width: 2px;
  font-size: 15px;
  min-width: 72px;
  padding: 6px 10px;
  text-shadow:
    0.4px 0 currentColor,
    -0.3px 0 currentColor;
}

.umaai-ticket-popup .race-stamp::before {
  border-width: 1px;
  inset: 2px;
}

.umaai-ticket-popup-card::after {
  color: rgba(0, 0, 0, 0.55);
  content: "クリックで閉じる";
  display: block;
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
  text-align: center;
}

@keyframes umaaiHitTicketPop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .umaai-hit-ticket {
    border-radius: 0;
    margin: 8px 0 10px;
    border-left: 0;
    border-right: 0;
  }

  .umaai-hit-ticket::before,
  .umaai-hit-ticket::after {
    display: none;
  }

  .umaai-hit-ticket-head {
    padding: 8px 10px;
  }

  .umaai-hit-ticket-title {
    font-size: 13px;
  }

  .umaai-hit-ticket-date {
    font-size: 10px;
  }

  .umaai-hit-ticket-race {
    grid-template-columns: 18% 1fr;
    min-height: 52px;
  }

  .umaai-hit-ticket-venue {
    padding: 5px 2px;
  }

  .umaai-hit-ticket-venue-name {
    font-size: 11px;
  }

  .umaai-hit-ticket-race-no {
    font-size: 20px;
  }

  .umaai-hit-ticket-race-main {
    padding: 7px 8px;
  }

  .umaai-hit-ticket-race-name {
    font-size: 13px;
    white-space: normal;
  }

  .umaai-hit-ticket-bet {
    grid-template-columns: 18% 1fr;
  }

  .umaai-hit-ticket-kind {
    font-size: 12px;
  }

  .umaai-hit-ticket-combo {
    font-size: 16px;
    min-height: 44px;
    padding: 7px 8px;
  }

  .umaai-hit-ticket-money-cell {
    padding: 8px 2px;
  }

  .umaai-hit-ticket-money-value {
    font-size: 13px;
  }

  .umaai-hit-ticket-comment {
    font-size: 11px;
    padding: 7px 10px;
  }

  .race-stamp-layer {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    pointer-events: none;
    position: absolute;
    right: 12px;
    top: 104px;
    z-index: 4;
  }

  .race-stamp {
    border-width: 2px;
    font-size: 13px;
    min-width: 62px;
    opacity: 0.82;
    padding: 6px 8px;
    text-shadow:
      0.4px 0 currentColor,
      -0.3px 0 currentColor;
    transform: rotate(-13deg);
  }

  .race-stamp::before {
    border-width: 1px;
    inset: 2px;
  }
}

@media (min-width: 769px) {
  .race-stamp-layer {
    align-items: center;
    display: flex;
    gap: 26px;
    justify-content: flex-end;
    pointer-events: none;
    position: absolute;
    right: 120px;
    top: 86px;
    z-index: 4;
  }
}

.saved-plan-card.saved-result-card {
  overflow: visible !important;
  position: relative !important;
}

.saved-result-card .saved-result-detail {
  overflow: visible;
  position: relative;
  z-index: 1;
}

.saved-result-card .umaai-ticket-popup-source[data-ticket-popup="1"] {
  cursor: pointer;
  display: block !important;
  left: 50% !important;
  margin: 0 !important;
  pointer-events: auto;
  position: absolute !important;
  top: 45% !important;
  transform: translate(-50%, -50%) !important;
  width: min(64%, 560px) !important;
  z-index: 200;
}

.saved-result-card .umaai-ticket-popup-source.is-hidden {
  display: none !important;
}

.saved-result-card .umaai-ticket-popup-source .umaai-ticket-popup-card {
  animation: none !important;
  left: auto !important;
  max-width: none !important;
  position: relative !important;
  top: auto !important;
  transform: none !important;
  width: 100% !important;
  z-index: 201;
}

.saved-result-card .umaai-ticket-popup-source .umaai-ticket-popup-card::after {
  content: none;
  display: none;
}

.saved-result-card .umaai-ticket-popup-source .popup-baken-card {
  opacity: 0;
  position: relative;
  transform: translate(var(--ticket-shift-x, var(--ticket-shift, 0px)), calc(42px + var(--ticket-shift-y, var(--ticket-shift, 0px))));
  transition:
    opacity 480ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: var(--ticket-z, 100);
}

.saved-result-card .umaai-ticket-popup-source.is-visible .popup-baken-card {
  opacity: 1;
  transform: translate(var(--ticket-shift-x, var(--ticket-shift, 0px)), var(--ticket-shift-y, var(--ticket-shift, 0px)));
}

.saved-result-card .umaai-ticket-popup-source .popup-baken-card.is-removing {
  opacity: 0;
  transform: translate(var(--ticket-shift-x, var(--ticket-shift, 0px)), calc(-24px + var(--ticket-shift-y, var(--ticket-shift, 0px)))) scale(0.96);
}

.saved-result-card .umaai-ticket-popup-source .popup-baken-card+.popup-baken-card {
  margin-top: -156px;
}

.saved-result-card .umaai-ticket-popup-source .popup-baken-card:last-of-type {
  margin-bottom: 0;
}

.saved-result-card .popup-baken-card {
  background:
    radial-gradient(circle at 82% 28%, rgba(24, 132, 61, 0.10) 0 46px, transparent 48px),
    repeating-linear-gradient(90deg, rgba(179, 220, 177, 0.34) 0 4px, rgba(249, 252, 246, 0.96) 4px 9px),
    #f9fcf6;
  border: 2px solid #1f3f23;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  color: #111;
  overflow: hidden;
  position: relative;
}

.saved-result-card .popup-baken-head {
  background: transparent;
  color: #111;
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  padding: 6px 10px 0;
}

.saved-result-card .popup-baken-badge {
  background: #15803d;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 10px;
}

.saved-result-card .popup-baken-body {
  display: grid;
  grid-template-columns: 130px 70px minmax(0, 1fr);
  min-height: 210px;
}

.saved-result-card .popup-baken-venue {
  background: rgba(24, 132, 61, 0.14);
  border-right: 2px solid #1f3f23;
  color: #111;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px;
  position: relative;
  text-align: left;
}

.saved-result-card .popup-baken-venue::after {
  background:
    repeating-linear-gradient(45deg, #111 0 4px, transparent 4px 8px),
    repeating-linear-gradient(-45deg, #111 0 4px, transparent 4px 8px);
  bottom: 18px;
  content: "";
  height: 48px;
  left: 12px;
  opacity: 0.85;
  position: absolute;
  width: 74px;
}

.saved-result-card .popup-baken-venue-name {
  font-size: 27px;
  font-weight: 900;
  line-height: 1.1;
}

.saved-result-card .popup-baken-rno {
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  margin-top: 4px;
}

.saved-result-card .popup-baken-kind {
  align-items: center;
  border-right: 2px solid #1f3f23;
  display: flex;
  font-size: 30px;
  font-weight: 900;
  justify-content: center;
  writing-mode: vertical-rl;
}

.saved-result-card .popup-baken-main {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
}

.saved-result-card .popup-baken-title {
  border: 2px solid #111;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
  padding: 6px 10px;
  text-align: center;
}

.saved-result-card .popup-baken-combo {
  align-items: center;
  display: flex;
  flex: 1;
  font-size: 34px;
  font-weight: 900;
  justify-content: center;
}

.saved-result-card .popup-baken-meta {
  color: #111;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.saved-result-card .popup-baken-total {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 8px;
}

.saved-result-card .popup-baken-total-cell {
  border-top: 1px solid rgba(0, 0, 0, 0.28);
  padding-top: 6px;
  text-align: center;
}

.saved-result-card .popup-baken-stamp {
  align-items: center;
  animation: popupBakenStampIn 420ms cubic-bezier(0.2, 1.45, 0.32, 1) 180ms both;
  aspect-ratio: 2.1 / 1;
  background: transparent;
  border: 0;
  box-shadow: none;
  box-sizing: border-box;
  color: #d51635;
  display: inline-flex;
  font-size: 5.3cqw;
  font-weight: 900;
  height: auto;
  justify-content: center;
  left: 50%;
  letter-spacing: 0.08em;
  line-height: 1;
  min-height: 0;
  min-width: 0;
  opacity: 0.88;
  padding: 0;
  pointer-events: none;
  position: absolute;
  text-shadow:
    0.7px 0 currentColor,
    -0.5px 0 currentColor;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  white-space: nowrap;
  width: 42cqw;
  z-index: 20;
}

.saved-result-card .popup-baken-stamp.hit {
  color: #d51635;
}

.saved-result-card .popup-baken-stamp.manbaken {
  color: #d4af37;
  width: 50.4cqw;
}

.saved-result-card .popup-baken-stamp::before,
.saved-result-card .popup-baken-stamp::after {
  content: "";
  pointer-events: none;
  position: absolute;
  transform: scaleY(0.8);
  transform-origin: center;
}

.saved-result-card .popup-baken-stamp::before {
  border: 4px solid currentColor;
  inset: 0;
  opacity: 0.88;
}

.saved-result-card .popup-baken-stamp::after {
  background:
    repeating-linear-gradient(8deg,
      transparent 0 8px,
      rgba(255, 255, 255, 0.7) 8px 10px,
      transparent 10px 17px),
    repeating-linear-gradient(-14deg,
      transparent 0 13px,
      rgba(255, 255, 255, 0.55) 13px 14px,
      transparent 14px 23px);
  border: 2px solid currentColor;
  inset: 6px;
  mix-blend-mode: screen;
  opacity: 0.72;
}

@keyframes popupBakenStampIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-45deg) scale(1.35);
  }

  58% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-45deg) scale(0.94);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-45deg) scale(1);
  }
}

.saved-result-card .popup-baken-note {
  color: rgba(0, 0, 0, 0.56);
  font-size: 10px;
  font-weight: 700;
  margin-top: 8px;
  padding: 0 0 6px;
  position: relative;
  text-align: center;
  z-index: 300;
}

@media (max-width: 768px) {
  .saved-result-card .umaai-ticket-popup-source[data-ticket-popup="1"] {
    left: 50% !important;
    margin: 0 !important;
    top: 41% !important;
    transform: translate(-50%, -50%) !important;
    width: 92% !important;
  }

  .saved-result-card .umaai-ticket-popup-source .popup-baken-card:nth-of-type(4n+1) {
    --ticket-shift-x: 8px;
  }

  .saved-result-card .umaai-ticket-popup-source .popup-baken-card:nth-of-type(4n+2) {
    --ticket-shift-x: -8px;
  }

  .saved-result-card .umaai-ticket-popup-source .popup-baken-card:nth-of-type(4n+3) {
    --ticket-shift-x: 6px;
  }

  .saved-result-card .umaai-ticket-popup-source .popup-baken-card:nth-of-type(4n) {
    --ticket-shift-x: -6px;
  }

  .saved-result-card .umaai-ticket-popup-source .popup-baken-card+.popup-baken-card {
    margin-top: -98px;
  }

  .saved-result-card .umaai-ticket-popup-source .popup-baken-card:last-of-type {
    margin-bottom: 0;
  }

  .saved-result-card .popup-baken-body {
    grid-template-columns: 76px 42px minmax(0, 1fr);
    min-height: 142px;
  }

  .saved-result-card .popup-baken-venue-name {
    font-size: 18px;
  }

  .saved-result-card .popup-baken-rno {
    font-size: 30px;
  }

  .saved-result-card .popup-baken-kind {
    font-size: 18px;
  }

  .saved-result-card .popup-baken-title {
    font-size: 15px;
  }

  .saved-result-card .popup-baken-combo {
    font-size: 22px;
  }

  .saved-result-card .popup-baken-venue::after {
    display: none;
  }

  .saved-result-card .popup-baken-stamp {
    aspect-ratio: 2.1 / 1;
    border-width: 2px;
    font-size: 5.3cqw;
    line-height: 1;
    min-height: 0;
    min-width: 0;
    padding: 0;
    text-shadow:
      0.4px 0 currentColor,
      -0.3px 0 currentColor;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 42cqw;
  }

  .saved-result-card .popup-baken-stamp.manbaken {
    width: 50.4cqw;
  }

  .saved-result-card .popup-baken-stamp::before {
    border-width: 2px;
    inset: 0;
  }

  .saved-result-card .popup-baken-stamp::after {
    background:
      repeating-linear-gradient(8deg,
        transparent 0 6px,
        rgba(255, 255, 255, 0.72) 6px 7px,
        transparent 7px 12px),
      repeating-linear-gradient(-14deg,
        transparent 0 10px,
        rgba(255, 255, 255, 0.55) 10px 11px,
        transparent 11px 18px);
    border-width: 1px;
    inset: 4px;
  }

  .saved-result-card .baken-image-popup-card .baken-image-preview {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

}