.qtybtn {
    margin-left: 8px;
    padding: 2px 8px;
    border: 1px solid #b8c7dc;
    border-radius: 4px;
    background: #fff;
    color: #234e96;
    font: inherit;
    line-height: 18px;
    vertical-align: middle;
    cursor: pointer;
    white-space: nowrap;
}

.qtybtn:hover {
    background: #edf3ff;
}

#qtyhelp {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    width: min(600px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    margin: auto;
    padding: clamp(14px, 5vw, 30px);
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: #1b2637;
    box-shadow: 0 14px 46px #14233e40;
    font: 14px/1.5 "Noto Sans KR", "Malgun Gothic", sans-serif;
    text-align: left;
    --qty-blue: #3155c7;
    --qty-pale: #eef2ff;
    --qty-muted: #646f84;
    --qty-line: #e2e7ef;
    --qty-inset: clamp(9px, 3vw, 18px);
}

#qtyhelp::backdrop {
    background: #16213380;
}

#qtyhelp .qtyhead {
    position: relative;
    margin: 0 0 18px;
    padding: 0 36px 0 0;
    border: 0;
}

#qtyhelp .qtyhead::before {
    display: block;
    width: 26px;
    height: 3px;
    margin-bottom: 12px;
    border-radius: 2px;
    background: var(--qty-blue);
    content: "";
}

#qtyhelp #qtytitle {
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    font-size: clamp(20px, 5vw, 27px);
    font-weight: 800;
    line-height: 1.3;
    word-break: keep-all;
}

#qtyhelp #qtysub {
    margin: 6px 0 0;
    color: var(--qty-muted);
    font-size: 14px;
    word-break: keep-all;
}

#qtyhelp .qtyclose {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f3f7;
    color: #344054;
    font: 23px/1 sans-serif;
    cursor: pointer;
}

#qtyhelp .qtydefs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 16px;
    padding: 12px 0;
    border-radius: 11px;
    background: var(--qty-pale);
}

#qtyhelp .qtydefs > div {
    padding: 0 var(--qty-inset);
}

#qtyhelp .qtydefs > div + div {
    border-left: 1px solid #d7e0fa;
}

#qtyhelp .qtydefs dt {
    color: var(--qty-blue);
    font-size: 18px;
    font-weight: 700;
}

#qtyhelp dd {
    margin: 4px 0 0;
}

#qtyhelp .qtycols {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 var(--qty-inset);
    color: var(--qty-muted);
    font-size: 12px;
    font-weight: 700;
}

#qtyhelp .qtylist {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#qtyhelp .qtylist li {
    margin: 0;
    padding: 13px var(--qty-inset) 16px;
    border: 1px solid var(--qty-line);
    border-radius: 11px;
    list-style: none;
}

#qtyhelp h3 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    color: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

#qtyhelp h3 span {
    color: var(--qty-blue);
    font-size: 12px;
}

#qtyhelp .qtyshow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(70px, 24%);
    align-items: center;
    gap: clamp(5px, 2.3vw, 15px);
}

#qtyhelp .qtytiles {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#qtyhelp .qtytiles span {
    display: grid;
    place-items: center;
    flex: 0 1 47px;
    min-width: 0;
    height: clamp(46px, 12vw, 63px);
    border-radius: 4px;
    background: #d43648;
    color: white;
    font-size: clamp(8px, 2.2vw, 13px);
    font-weight: 700;
    white-space: nowrap;
}

#qtyhelp .qtysets {
    gap: 0;
}

#qtyhelp .qtysets > div {
    display: flex;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    gap: 4px;
}

#qtyhelp .qtysets > div + div::before {
    align-self: center;
    flex: 0 0 1px;
    height: 40%;
    margin: 0 3px;
    background: var(--qty-line);
    content: "";
}

#qtyhelp .qtytiles span.qtyb,
#qtyhelp .qtyb span { background: #147d49; }
#qtyhelp .qtyc span { background: #245de3; }
#qtyhelp .qtyarrow { color: #98a2b3; font: 28px/1 sans-serif; }

#qtyhelp .qtyresult {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-content: center;
    min-height: clamp(46px, 12vw, 63px);
    gap: 3px;
    margin: 0;
    padding: 0 4px;
    border-radius: 7px;
    background: var(--qty-pale);
    text-align: center;
    white-space: nowrap;
}

#qtyhelp .qtyresult dt {
    color: var(--qty-muted);
    font-size: 11px;
    font-weight: 700;
}

#qtyhelp .qtyresult dd {
    margin: 1px 0 0;
    font-size: clamp(15px, 4vw, 23px);
    font-weight: 800;
    line-height: 1.2;
}

#qtyhelp .qtyresult div + div dd { color: var(--qty-blue); }

#qtyhelp .qtynote {
    display: flex;
    gap: 8px;
    margin: 16px 0 0;
    padding: 10px var(--qty-inset);
    border-radius: 9px;
    background: #f4f5f7;
    color: var(--qty-muted);
    word-break: keep-all;
}

@media (max-width: 420px) {
    #qtyhelp { width: calc(100% - 16px); }
    #qtyhelp .qtylist li { padding-top: 9px; padding-bottom: 10px; }
    #qtyhelp .qtyarrow { font-size: 19px; }
    #qtyhelp .qtysets > div { gap: 2px; }
    #qtyhelp .qtysets > div + div::before { margin: 0 1px; }
}

@media (max-width: 355px) {
    #qtyhelp { padding: 10px; }
    #qtyhelp .qtylist li { padding-inline: 7px; }
    #qtyhelp .qtyshow { grid-template-columns: minmax(0, 1fr) auto 60px; gap: 4px; }
    #qtyhelp .qtyarrow { font-size: 16px; }
}
