/* ================= UPGRADE TAB (builds on craft.css: .craft-view, .craft-live, modals, buttons) ================= */
.up-chev { width: 22px; height: 22px; }
.upgrade-view .craft-subrow { margin: 6px 0 8px; }

/* your gift  >>  target gift */
.up-pair { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; }
.up-arrows { display: flex; justify-content: center; color: #8f7bff; font-size: 22px; filter: drop-shadow(0 0 6px rgba(130, 110, 255, 0.7)); }
.up-arrows ion-icon:last-child { margin-left: -13px; color: #b78cff; }
.up-card {
    --c: 74, 168, 255;
    position: relative;
    height: 142px;
    display: flex;
    flex-direction: column;
    padding: 8px 9px 9px;
    border-radius: 18px;
    border: 1.5px solid rgba(var(--c), 0.8);
    background: linear-gradient(180deg, rgba(var(--c), 0.12), rgba(10, 18, 40, 0.9) 70%);
    box-shadow: 0 0 14px rgba(var(--c), 0.35), inset 0 0 14px rgba(var(--c), 0.12);
    min-width: 0;
    color: #fff;
}
.up-dst { --c: 190, 110, 255; }
.up-card-head { display: flex; align-items: center; gap: 5px; font: 600 11.5px Inter, sans-serif; color: #dfe8ff; white-space: nowrap; }
.up-card-head ion-icon { font-size: 15px; color: rgb(var(--c)); flex: 0 0 auto; }
.up-card-x {
    margin-left: auto;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.up-card-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    background: none;
    padding: 0;
    color: rgba(var(--c), 1);
    font: 600 12.5px Inter, sans-serif;
}
.up-card-empty i {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    border: 1.5px dashed rgba(var(--c), 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-style: normal;
    color: #fff;
}
.up-card-body { flex: 1; min-height: 0; display: flex; flex-direction: column; border: none; background: none; padding: 0; color: #fff; text-align: left; }
.up-card-pic {
    position: relative;
    flex: 1;
    min-height: 0;
    margin-top: 5px;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 40%, rgba(var(--c), 0.3), rgba(6, 10, 26, 0.85) 75%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.up-card-pic img { height: 92%; max-width: 92%; object-fit: contain; animation: crPop 0.25s ease-out; }
.up-card-pic .up-next { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 16px; color: #fff; opacity: 0.85; }
.up-card-name { margin-top: 4px; font: 700 12.5px Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-card-row { display: flex; align-items: center; gap: 5px; margin-top: 2px; min-width: 0; }
.up-card-model { flex: 1; min-width: 0; color: #9aa9cc; font: 500 10.5px Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-price {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    font: 800 12px Inter, sans-serif;
    font-variant-numeric: tabular-nums;
}
.up-price .cr-ton { width: 12px; height: 12px; }

/* chance gauge */
.up-chance {
    margin-top: 8px;
    padding: 7px 12px 6px;
    border-radius: 18px;
    background: var(--cr-card);
    border: 1px solid var(--cr-line);
}
.up-chance-head { display: flex; align-items: center; gap: 8px; font: 700 13.5px Inter, sans-serif; }
.up-chance-head > ion-icon { font-size: 18px; color: #3ee0c8; }
.up-info { margin-left: auto; }
.up-gauge { position: relative; height: 84px; display: flex; justify-content: center; }
.up-gauge svg { position: absolute; top: -2px; width: 190px; height: 96px; overflow: visible; }
.up-gauge path { fill: none; stroke-width: 11; stroke-linecap: round; transition: stroke 0.3s; }
.up-gauge .off { stroke: rgba(130, 150, 200, 0.22); }
.up-gauge-text { position: absolute; bottom: 2px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.up-gauge-level { font: 800 22px/1.1 Inter, sans-serif; text-shadow: 0 0 12px currentColor; }
.up-gauge-pct { margin-top: 1px; color: #a9b8dc; font: 600 11.5px Inter, sans-serif; font-variant-numeric: tabular-nums; }
.up-gauge-q {
    width: 26px;
    height: 26px;
    margin-bottom: 4px;
    border-radius: 50%;
    border: 1.5px solid #8f9fff;
    color: #b5c0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 14px Inter, sans-serif;
}
.up-gauge-hint { color: #a9b8dc; font: 500 12px/1.35 Inter, sans-serif; max-width: 200px; }

/* boost */
.up-boost {
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px 6px 12px;
    border-radius: 16px;
    background: var(--cr-card);
    border: 1px solid var(--cr-line);
}
.up-boost-icon { font-size: 21px; color: #dfe8ff; flex: 0 0 auto; }
.up-boost-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.up-boost-text b { font: 700 13.5px Inter, sans-serif; }
.up-boost-text small { color: #9aa9cc; font: 500 11px Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-boost-val {
    height: 34px;
    min-width: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    border-radius: 17px;
    border: 1px solid var(--cr-line);
    background: rgba(10, 18, 40, 0.8);
    color: #fff;
    font: 700 14px Inter, sans-serif;
    font-variant-numeric: tabular-nums;
}
.up-boost-val img { width: 16px; height: 16px; }
.up-boost-val ion-icon { font-size: 13px; color: #9aa9cc; }
.up-boost-plus {
    width: 36px;
    height: 34px;
    flex: 0 0 auto;
    padding: 0;
    border-radius: 11px;
    border: 1.5px solid #4aa8ff;
    background: rgba(40, 110, 230, 0.25);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(70, 160, 255, 0.4);
}
.up-boost.off .up-boost-val, .up-boost.off .up-boost-plus { opacity: 0.4; box-shadow: none; border-color: var(--cr-line); }

/* target suggestions: one row, scrolls sideways */
.up-targets {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    margin: 0 -12px;
    padding: 2px 12px 4px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.up-targets::-webkit-scrollbar { display: none; }
.up-tcard {
    flex: 0 0 76px;
    height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 4px 6px;
    border-radius: 15px;
    border: 1.5px solid rgba(120, 170, 255, 0.2);
    background: rgba(18, 28, 56, 0.8);
    color: #fff;
    scroll-snap-align: start;
    min-width: 0;
}
.up-tcard img { width: 44px; height: 44px; object-fit: contain; }
.up-tcard b { max-width: 100%; margin-top: 2px; font: 600 11px Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-tcard .up-price { margin-top: 3px; font-size: 11px; padding: 2px 6px; }
.up-tcard.on { border-color: #4ac8ff; box-shadow: 0 0 12px rgba(70, 190, 255, 0.55), inset 0 0 10px rgba(70, 190, 255, 0.2); background: rgba(24, 50, 96, 0.8); }
.up-tcard:disabled { opacity: 0.35; }
.up-targets-empty { flex: 1; height: 92px; }

.up-go { margin-top: 8px; background: linear-gradient(90deg, #2f9bff 0%, #4f6bff 55%, #8a4dff 100%); border-color: rgba(190, 200, 255, 0.55); box-shadow: 0 0 22px rgba(90, 120, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.up-go .up-chev { width: 24px; height: 24px; }
.up-how {
    width: 100%;
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px;
    border-radius: 16px;
    border: 1px solid var(--cr-line);
    background: rgba(18, 28, 56, 0.6);
    color: #c4d0ee;
    font: 600 13px Inter, sans-serif;
}
.up-how ion-icon { font-size: 18px; }

/* ---------- modals ---------- */
.up-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 0 12px;
    height: 40px;
    border-radius: 13px;
    border: 1px solid rgba(110, 160, 255, 0.3);
    background: rgba(16, 26, 54, 0.8);
}
.up-search ion-icon { color: #8494b8; font-size: 17px; }
.up-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: #fff; font: 500 14px Inter, sans-serif; }
.up-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.up-cat-grid .cr-tile { border: 1px solid rgba(90, 150, 255, 0.35); color: #fff; font-family: Inter, sans-serif; }
.up-cat-grid .cr-tile.on { border-color: #b78cff; box-shadow: 0 0 12px rgba(180, 120, 255, 0.55); }
.up-cat-note { margin: -4px 0 10px; color: #9aa9cc; font-size: 12.5px; }

.up-boost-sheet .cr-modal-sub { margin-top: -4px; }
.up-bs-cur { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.up-bs-cur button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(110, 160, 255, 0.3);
    background: rgba(16, 26, 54, 0.8);
    color: #c4d0ee;
    font: 700 14px Inter, sans-serif;
}
.up-bs-cur button img { width: 16px; height: 16px; }
.up-bs-cur button.on { color: #fff; border-color: #4aa8ff; background: rgba(40, 110, 230, 0.3); box-shadow: 0 0 10px rgba(70, 160, 255, 0.4); }
.up-bs-input { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(110, 160, 255, 0.35); background: rgba(10, 18, 40, 0.9); }
.up-bs-input img { width: 20px; height: 20px; }
.up-bs-input input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: #fff; font: 800 20px Inter, sans-serif; font-variant-numeric: tabular-nums; }
.up-bs-input small { color: #8494b8; font-size: 12px; white-space: nowrap; }
.up-bs-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 10px; }
.up-bs-quick button { height: 32px; border-radius: 10px; border: 1px solid rgba(110, 160, 255, 0.3); background: rgba(16, 26, 54, 0.8); color: #dfe8ff; font: 700 12.5px Inter, sans-serif; }
.up-bs-res { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; background: rgba(20, 32, 62, 0.7); border: 1px solid rgba(120, 170, 255, 0.16); color: #b9c6e6; font-size: 13.5px; }
.up-bs-res b { font: 800 16px Inter, sans-serif; }

/* how it works */
.up-how-list { display: flex; flex-direction: column; gap: 8px; }
.up-how-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; background: rgba(20, 32, 62, 0.65); border: 1px solid rgba(120, 170, 255, 0.16); }
.up-how-item > ion-icon, .up-how-item > svg { flex: 0 0 auto; font-size: 26px; width: 26px; height: 26px; color: #4ac8ff; }
.up-how-item:nth-child(2) > ion-icon { color: #e07bff; }
.up-how-item:nth-child(3) > ion-icon { color: #ffd23c; }
.up-how-item:nth-child(4) > ion-icon { color: #dfe8ff; }
.up-how-item div { flex: 1; }
.up-how-item b { font-size: 15px; }
.up-how-item p { margin: 3px 0 0; color: #b9c6e6; font: 500 12.5px/1.4 Inter, sans-serif; }
.up-how-levels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.up-how-levels span { padding: 2px 7px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); font: 700 11px Inter, sans-serif; }
.up-how-ok { margin-top: 14px; background: linear-gradient(90deg, #2f9bff 0%, #4f6bff 55%, #8a4dff 100%); }

/* confirm */
.up-confirm-pair { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 8px; }
.up-confirm-pair img { width: 64px; height: 64px; object-fit: contain; padding: 4px; border-radius: 14px; background: rgba(80, 150, 255, 0.15); border: 1px solid rgba(110, 170, 255, 0.45); }
.up-confirm-pair img:last-child { background: rgba(170, 110, 255, 0.18); border-color: rgba(190, 120, 255, 0.55); }
.up-confirm-pair ion-icon { font-size: 22px; color: #b78cff; }

/* ---------- upgrade animation: a pointer runs round a ring and stops on the server's roll ---------- */
.up-anim .up-ring { position: relative; width: 250px; height: 250px; }
.up-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.up-ring circle { fill: none; stroke-width: 16; }
.up-ring .bg { stroke: rgba(255, 77, 141, 0.35); }
.up-ring .win { stroke: #34e08a; filter: drop-shadow(0 0 6px rgba(52, 224, 138, 0.8)); }
.up-ring-center { position: absolute; inset: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(140, 100, 255, 0.35), rgba(10, 14, 40, 0.9) 70%); }
.up-ring-center img { width: 62%; height: 62%; object-fit: contain; filter: drop-shadow(0 0 12px rgba(160, 130, 255, 0.7)); }
.up-ring-pointer { position: absolute; inset: 0; transform: rotate(0deg); }
.up-ring-pointer::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -10px;
    width: 0;
    height: 0;
    margin-left: -10px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 22px solid #fff;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}
.up-ring-pct { margin-top: 16px; color: #bcd6ff; font: 700 15px Inter, sans-serif; }
.up-lost-img { filter: grayscale(1) brightness(0.55); }

/* ---------- fit the whole page on one phone screen (same budget as craft) ---------- */
.upgrade-view .craft-subrow { margin: 5px 0 6px; }
.upgrade-view .craft-live { margin-top: 8px; }
.up-card { height: 128px; padding: 7px 8px 8px; }
.up-card-empty i { width: 46px; height: 46px; font-size: 24px; }
.up-chance { margin-top: 7px; padding: 6px 12px 5px; }
.up-gauge { height: 72px; }
.up-gauge svg { width: 160px; height: 81px; }
.up-gauge-level { font-size: 20px; }
.up-gauge-q { width: 22px; height: 22px; font-size: 12px; margin-bottom: 2px; }
.up-boost { margin-top: 6px; padding: 4px 6px 4px 12px; }
.upgrade-view .craft-sec { margin: 8px 2px 6px; }
.up-tcard { height: 84px; padding: 4px 4px 5px; }
.up-tcard img { width: 38px; height: 38px; }
.up-targets-empty { height: 84px; }
.up-go { margin-top: 6px; }
.up-how { margin-top: 6px; padding: 5px; }
.up-gauge { height: 78px; }
.up-gauge svg { width: 186px; height: 94px; }
.up-gauge-text { bottom: 0; }
.up-gauge-level { font-size: 19px; }
.cr-anim.up-anim { background: radial-gradient(circle at 50% 45%, rgba(40, 50, 150, 0.85), rgba(2, 4, 12, 0.97) 65%); }

/* ---------- v2 (iPhone): bigger gift pictures without the dark box; gauge in normal flow ---------- */
.up-card { height: 140px; }
.up-card-pic {
    margin-top: 2px;
    border-radius: 0;
    background: radial-gradient(closest-side, rgba(var(--c), 0.38), rgba(var(--c), 0.12) 60%, transparent);
}
.up-card-pic img { height: 100%; max-width: 100%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)); }
.up-card-pic .up-next { right: -2px; }
.up-gauge { position: relative; display: block; width: 190px; height: auto; margin: 2px auto 0; }
.up-gauge svg { position: static; display: block; width: 100%; height: auto; }
.up-gauge-text { position: absolute; left: 14px; right: 14px; bottom: 0; }
.up-gauge-level { font-size: 17px; white-space: nowrap; }
.up-gauge-hint { font-size: 11.5px; }
.up-gauge { width: 178px; margin-top: 0; }

/* ---------- catalog: your gift on top + "price from" steps ---------- */
.up-cat-mine {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 10px;
    border-radius: 16px;
    border: 1.5px solid rgba(74, 168, 255, 0.7);
    background: linear-gradient(180deg, rgba(74, 168, 255, 0.14), rgba(10, 18, 40, 0.9));
    box-shadow: 0 0 12px rgba(74, 168, 255, 0.3);
}
.up-cat-mine > img { width: 46px; height: 46px; object-fit: contain; flex: 0 0 46px; }
.up-cat-mine > i { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; border: 1.5px dashed rgba(74, 168, 255, 0.6); display: flex; align-items: center; justify-content: center; font: 400 24px Inter, sans-serif; font-style: normal; color: #fff; }
.up-cat-mine > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.up-cat-mine small { color: #59b2ff; font: 600 11px Inter, sans-serif; }
.up-cat-mine b { font: 700 13.5px Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-cat-mine div span { color: #9aa9cc; font: 500 11.5px/1.3 Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; }
.up-cat-mine.empty div span { color: #c4d0ee; }
.up-cat-mine button {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 12px;
    border-radius: 15px;
    border: 1px solid rgba(80, 160, 255, 0.55);
    background: rgba(40, 110, 230, 0.25);
    color: #fff;
    font: 700 12.5px Inter, sans-serif;
}
.up-cat-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.up-cat-steps::-webkit-scrollbar { display: none; }
.up-cat-steps[hidden] { display: none; }
.up-cat-steps > span { flex: 0 0 auto; color: #9aa9cc; font: 600 12px Inter, sans-serif; }
.up-cat-steps button {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 10px 3px;
    border-radius: 12px;
    border: 1px solid rgba(110, 160, 255, 0.3);
    background: rgba(16, 26, 54, 0.8);
    color: #dfe8ff;
}
.up-cat-steps button b { display: flex; align-items: center; font: 800 12.5px Inter, sans-serif; font-variant-numeric: tabular-nums; }
.up-cat-steps button b .cr-ton { width: 12px; height: 12px; }
.up-cat-steps button small { color: #8494b8; font: 600 10px Inter, sans-serif; }
.up-cat-steps button.on { border-color: #b78cff; background: rgba(140, 90, 255, 0.28); box-shadow: 0 0 10px rgba(170, 110, 255, 0.45); }
.up-cat-steps button.on small { color: #d9c4ff; }

/* catalog: collection + model pickers */
.up-cat-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -2px 0 10px; }
.up-select { position: relative; display: flex; align-items: center; height: 38px; border-radius: 12px; border: 1px solid rgba(110, 160, 255, 0.3); background: rgba(16, 26, 54, 0.8); }
.up-select select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    padding: 0 28px 0 12px;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font: 600 13px Inter, sans-serif;
    text-overflow: ellipsis;
}
.up-select select option { color: #000; }
.up-select select:disabled { color: #6f7fa6; }
.up-select ion-icon { position: absolute; right: 10px; font-size: 14px; color: #9aa9cc; pointer-events: none; }

/* pickers with small pictures */
.up-select { gap: 7px; padding: 0 28px 0 8px; color: #fff; font: 600 13px Inter, sans-serif; text-align: left; min-width: 0; }
.up-select:disabled { opacity: 0.45; }
.up-select > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-select-img { width: 24px; height: 24px; flex: 0 0 24px; object-fit: contain; }
.up-select-all { flex: 0 0 auto; font-size: 17px; color: #59b2ff; position: static !important; }
.up-select .up-select-caret { position: absolute; right: 10px; }
.up-pick-list { display: flex; flex-direction: column; }
.up-pick-items { display: flex; flex-direction: column; }
.up-pick-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border: none;
    border-bottom: 1px solid rgba(120, 170, 255, 0.08);
    border-radius: 10px;
    background: none;
    color: #fff;
    text-align: left;
}
.up-pick-row.on { background: rgba(60, 130, 255, 0.16); }
.up-pick-img { width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; }
.up-pick-all { display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(60, 130, 255, 0.18); color: #59b2ff; font-size: 18px; }
.up-pick-name { flex: 1; min-width: 0; font: 600 14px Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pick-right { display: flex; align-items: center; color: #9aa9cc; font: 600 12px Inter, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up-pick-right .cr-ton { width: 12px; height: 12px; margin-left: 3px; }
.up-pick-check { flex: 0 0 auto; font-size: 17px; color: #59b2ff; visibility: hidden; }
.up-pick-row.on .up-pick-check { visibility: visible; }
.up-picker .cr-modal-card { z-index: 1; }

/* ---------- v3: fill the whole screen. The two gift cards and the chance gauge take the spare
   height (tall phones get bigger pictures and a bigger gauge), small phones keep the compact look. */
.upgrade-view .craft-scroll { display: flex; flex-direction: column; }
.upgrade-view .craft-scroll > * { flex: 0 0 auto; }
.upgrade-view .up-pair { flex: 1 1 140px; min-height: 140px; max-height: 260px; align-items: stretch; }
.upgrade-view .up-pair .up-arrows { align-self: center; }
.upgrade-view .up-card { height: auto; }
.upgrade-view .up-card-empty i { width: 54px; height: 54px; font-size: 26px; }
.upgrade-view .up-chance { flex: 1 1 110px; min-height: 110px; max-height: 250px; display: flex; flex-direction: column; }
.upgrade-view .up-gauge { flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; align-items: flex-end; }
.upgrade-view .up-gauge svg { height: 100%; width: auto; max-width: 100%; max-height: 150px; aspect-ratio: 190 / 100; }
.upgrade-view .up-gauge-text { left: 0; right: 0; }
.upgrade-view .up-go { margin-top: 8px; }
@media (min-height: 780px) {
    .upgrade-view .up-gauge-level { font-size: 22px; }
    .upgrade-view .up-gauge-hint { font-size: 12.5px; }
    .upgrade-view .up-card-name { font-size: 14px; }
    .upgrade-view .up-card-head { font-size: 12.5px; }
    .upgrade-view .up-chance, .upgrade-view .up-boost { margin-top: 10px; }
    .upgrade-view .up-boost { padding: 8px 8px 8px 12px; }
    .upgrade-view .up-go { margin-top: 12px; padding: 13px; font-size: 17px; }
    .upgrade-view .up-how { margin-top: 10px; padding: 8px; }
}
/* pictures never push the card taller: the free space decides their size */
.upgrade-view .up-card { min-height: 0; overflow: hidden; }
.upgrade-view .up-card-body { min-height: 0; }
.upgrade-view .up-card-pic { min-height: 0; }
.upgrade-view .up-card-pic img { position: absolute; left: 6%; top: 4%; width: 88%; height: 92%; max-width: none; object-fit: contain; }
.upgrade-view .up-chance { overflow: hidden; }
