/* Currency order totals and comparison unit prices have separate visual roles. */
.item_create_page .market_price_guide.has-entered-price .market_price_position .market_price_compare {
    --market-price-bubble-shift: -50%;
    --market-price-bubble-inset: min(115px, 50%);
    box-sizing: border-box;
    left: clamp(var(--market-price-bubble-inset), var(--market-price-position), calc(100% - var(--market-price-bubble-inset)));
}
.item_create_page .market_price_position [data-price-compare-text] { white-space: normal; }
@media (max-width: 420px) {
    .item_create_page .market_price_guide .market_price_guide_head {
        grid-template-columns: 34px minmax(0, 1fr);
    }
    .item_create_page .market_price_guide .market_price_guide_head p { display: block; }
    .item_create_page .market_price_guide .market_price_guide_actions {
        grid-column: 2;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}
.currency_order_preview { margin-top:14px; padding:14px 16px; border:1px solid #efdac2; border-radius:10px; background:#fffaf4; color:#282828; }
.currency_order_preview[hidden] { display:none; }
.currency_order_caption { display:block; margin-bottom:8px; font-size:12px; color:#71685d; }
.currency_order_line { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:6px 16px; font-size:17px; line-height:1.5; }
.currency_order_line > * { min-width:0; overflow-wrap:anywhere; }
.currency_order_preview .currency_order_line strong { color:inherit; }
.currency_order_line b { color:#b75500; }
.currency_order_preview p { margin:6px 0 0; font-size:12px; color:#71685d; line-height:1.5; overflow-wrap:anywhere; }
.currency_order_examples { display:grid; gap:6px; margin:12px 0 0; padding-top:10px; border-top:1px solid #efdac2; font-size:12px; line-height:1.5; }
.currency_order_examples[hidden] { display:none; }
.currency_order_examples > div { display:flex; justify-content:space-between; gap:8px 16px; }
.currency_order_examples dt,.currency_order_examples dd { min-width:0; margin:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.currency_order_examples dd { flex-shrink:0; font-weight:var(--medium); }
.item_price .currency_order_price { display:flex; flex-direction:column; gap:2px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.item_price:has(> .currency_order_price) { display:block; }
.item_price:has(> .currency_order_price)::before { display:none; }
.item_price .currency_order_price small { font-size:13px; font-weight:400; color:var(--gray-600); }
.item_card .item_price .currency_card_price_context,
.item_card .item_price .currency_card_price_basis {
    color:var(--gray-600);
    font-size:12px;
    font-weight:var(--medium);
    line-height:1.5;
    white-space:normal;
    overflow-wrap:anywhere;
}
.item_card .item_price .currency_card_price_context { display:block; margin-bottom:2px; }
.detail_type .item_card .currency_card_price_context { text-align:center; }
.item_card .item_tag.currency_card_plain_note { color:var(--gray-600); }
.itemmarket_page .item_card .currency_order_price small { text-align:center; }
.item_price .currency_order_price strong { display:inline-flex; flex-wrap:wrap; align-items:baseline; justify-content:flex-start; gap:4px; font-size:18px; font-weight:700; line-height:1.35; color:#b75500; }
.item_price .currency_order_amount { min-width:0; font-size:inherit; font-weight:inherit; color:inherit; }
.item_price .currency_order_unit { margin-left:2px; font-size:13px; font-weight:var(--medium); color:inherit; }
.item_price .currency_order_from { font-size:13px; font-weight:400; color:var(--gray-600); }
.detail_type .currency_order_price strong { justify-content:center; }
.playlog_page[data-view-mode="card"] .currency_order_price strong { justify-content:center; }
.item_price .currency_order_price strong::before { content:''; align-self:center; flex:0 0 14px; width:14px; height:14px; background:url('/images/point.svg') no-repeat center/contain; }
.item_price .currency_comparison_price { display:block; margin-top:6px; font-size:12px; font-weight:400; line-height:1.5; color:var(--gray-600); white-space:normal; overflow-wrap:anywhere; }
body:has(.quantity_terms .currency_sale_v2:not([hidden])) .s_info_price .s_price { display:block; white-space:normal; overflow-wrap:anywhere; line-height:1.65; }
body:has(.quantity_terms .currency_sale_v2:not([hidden])) .s_info_price .s_info_row { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
body:has(.quantity_terms .currency_sale_v2:not([hidden])) .s_info_price .s_info_label,
body:has(.quantity_terms .currency_sale_v2:not([hidden])) .s_info_price .s_info_value { width:100%; text-align:left; }
body:has(.quantity_terms .currency_sale_v2:not([hidden])) .sale_contract_confirm_product { white-space:pre-line; font-size:14px; line-height:1.75; overflow-wrap:anywhere; }
.currency_buy_order { box-sizing:border-box; width:100%; padding:12px 14px; text-align:left; }
.currency_buy_order .currency_order_line { font-size:15px; }
.currency_buy_order .currency_order_caption { margin-bottom:4px; }
.currency_buy_order[hidden] { display:none; }
.item_body[data-currency-v2="true"] .item_qty_price { font-size:12px; font-weight:400; line-height:1.6; color:#777b83; }
.currency_whole_only_label { margin:6px 0; font-size:13px; line-height:1.5; font-weight:var(--medium); color:var(--gray-700); }
.currency_comparison_price.currency_seller_price { color:var(--gray-600); }
html.dark .currency_order_preview,body.dark .currency_order_preview { background:#30291f; border-color:#63503a; color:#f1ede7; }
:is(html.dark,body.dark) .currency_order_examples { border-color:#63503a; }
html.dark .currency_order_caption,body.dark .currency_order_caption,html.dark .currency_order_preview p,body.dark .currency_order_preview p { color:#bfb3a3; }
html.dark .currency_order_line b,body.dark .currency_order_line b { color:#ffb26c; }
html.dark .item_price .currency_order_price small,body.dark .item_price .currency_order_price small { color:#c3c5ca; }
html.dark .item_price .currency_order_price strong,body.dark .item_price .currency_order_price strong { color:#ffb26c; }
html.dark .item_price .currency_comparison_price,body.dark .item_price .currency_comparison_price { color:#a8abb3; }
html.dark .item_body[data-currency-v2="true"] .item_qty_price,body.dark .item_body[data-currency-v2="true"] .item_qty_price { color:#a8abb3; }
@media(max-width:480px) { .currency_order_preview { padding:12px; } .currency_order_line { font-size:15px; gap:4px 12px; } }

/* Keep the final payable order beside the action, after notes/agreements. */
.item_buy_popup .btn_list.currency_purchase_footer { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.currency_purchase_footer .currency_final_review { grid-column:1/-1; padding:12px 14px; border:1px solid #efdac2; border-radius:10px; background:#fffaf4; text-align:left; }
.currency_final_server { display:block; margin-bottom:5px; color:#71685d; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.currency_final_review > div { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:4px 12px; color:#282828; font-size:16px; line-height:1.5; }
.currency_final_review strong,.currency_final_review b { min-width:0; overflow-wrap:anywhere; }
.currency_final_review b { color:#b75500; }
.currency_final_review.is-invalid { border-color:#c74e32; }
.currency_purchase_footer > .btn_shrink { width:100%; min-width:0; min-height:44px; margin:0; }
.item_buy_popup .item_body[data-currency-v2="true"] .total_price_text[hidden] { display:none; }
.item_buy_popup .item_body[data-currency-v2="true"] .currency_buy_status:empty { display:none; }
.item_buy_popup .currency_buy_order { margin-top:10px; }
.item_buy_popup .currency_buy_order .currency_order_caption { font-size:12px; }

/* Quantity first, compact limits second. No duplicated example order list. */
.item_buy_popup .currency_purchase_terms { gap:6px 12px; margin:0 0 12px; }
.item_buy_popup .currency_purchase_terms > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; padding:0; border:0; background:transparent; }
.item_buy_popup .currency_purchase_terms dd { margin:0; font-size:13px; line-height:1.5; }
.item_buy_popup .currency_purchase_amount_row { display:grid; grid-template-columns:minmax(0,1fr) 120px; gap:8px; }
.item_buy_popup .currency_purchase_amount_row > .qty_input { width:100%; box-sizing:border-box; padding:10px 8px; }
.item_buy_popup .currency_purchase_amount_row > [data-currency-purchase-unit-picker] { min-width:0; }
.item_buy_popup .currency_purchase_amount_row .select_main { gap:6px; padding:8px; }
.item_buy_popup .currency_purchase_amount_row .select_text p,
.quantity_terms .currency_editor_picker .select_text p { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; font-size:13px; line-height:1.3; }
.item_buy_popup .currency_purchase_amount_row.is-long-amount { grid-template-columns:minmax(0,1fr); }
.item_buy_popup .currency_purchase_amount_row.is-long-amount > [data-currency-purchase-unit-picker] { width:120px; justify-self:end; }
.item_buy_popup .currency_purchase_controls { grid-template-columns:repeat(4,minmax(0,1fr)); margin:8px 0 0; }
.item_buy_popup .currency_purchase_controls > button { min-width:0; min-height:44px; padding:4px 3px; font-size:13px; line-height:1.35; white-space:normal; word-break:keep-all; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.item_buy_popup .currency_purchase_controls > button:disabled { opacity:.4; cursor:default; }
.item_buy_popup .currency_purchase_controls > button:disabled:hover { filter:none; }
.item_buy_popup .currency_purchase_actual { margin:8px 0 0; font-size:12px; color:var(--gray-500); font-weight:400; }
.item_buy_popup .currency_purchase_examples[hidden] { display:none; }
.item_buy_popup .currency_purchase_recovery { margin-top:10px; text-align:left; }
.item_buy_popup .currency_purchase_recovery[hidden] { display:none; }
.currency_purchase_recovery > p { margin:0 0 6px; font-size:12px; line-height:1.5; color:var(--gray-600); }
.currency_purchase_recovery > div { display:flex; flex-wrap:wrap; gap:6px; }
.currency_purchase_recovery button { min-width:0; min-height:44px; padding:8px 12px; border:1px solid var(--gray-300); border-radius:6px; background:var(--white); color:var(--gray-700); font-size:13px; line-height:1.5; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.currency_purchase_recovery button:hover { background:var(--gray-100); }
.currency_purchase_recovery button:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
:is(html.dark,body.dark) .currency_purchase_recovery button { border-color:var(--dark-line); }
.item_buy_popup .currency_purchase_editor > .currency_buy_status { margin:8px 0 0; font-size:13px; line-height:1.6; text-align:left; }
.item_buy_popup .currency_purchase_editor.is-whole-only > :not(.currency_purchase_examples):not(.currency_buy_status):not(.currency_purchase_recovery) { display:none; }
.item_buy_popup .currency_purchase_editor.is-whole-only .currency_purchase_examples { margin:0; padding:10px 0 0; }
.item_buy_popup .popup_item_main:has(.currency_purchase_editor) > .item_thumb { width:36px; height:36px; margin-bottom:6px; }
.item_buy_popup .item_body[data-currency-v2="true"] .item_name { margin-bottom:4px; }

html.dark .currency_purchase_footer .currency_final_review,body.dark .currency_purchase_footer .currency_final_review { background:#30291f; border-color:#63503a; }
html.dark .currency_final_server,body.dark .currency_final_server { color:#bfb3a3; }
html.dark .currency_final_review > div,body.dark .currency_final_review > div { color:#f1ede7; }
html.dark .currency_final_review b,body.dark .currency_final_review b { color:#ffb26c; }
html.dark .currency_final_review.is-invalid,body.dark .currency_final_review.is-invalid { border-color:#ff9d7f; }
html.dark .item_buy_popup .currency_purchase_terms > div,body.dark .item_buy_popup .currency_purchase_terms > div { background:transparent; }
@media(max-width:480px) {
    .quantity_terms .currency_conditions { margin-top:12px; }
    .quantity_terms .currency_conditions_editor { gap:10px; padding:10px; }
    .quantity_terms .currency_conditions_editor > .currency_amount_field { gap:6px; }
    .quantity_terms .currency_condition_amount_hint { min-height:0; margin:0; }
    .quantity_terms .currency_conditions_mode p { font-size:12px; line-height:1.5; }
    .quantity_terms .currency_sale_v2 > .currency_order_preview { margin-top:10px; }
    .item_buy_popup .currency_purchase_terms { grid-template-columns:1fr; gap:4px; }
    .item_buy_popup .currency_purchase_terms > div { justify-content:space-between; }
    .item_buy_popup .currency_final_review { padding:10px 12px; }
    .item_buy_popup .currency_final_review > div { font-size:15px; }
}

/* Currency controls share the site's form hierarchy, surfaces and state feedback. */
.quantity_terms .currency_amount_field > .form_label { display:block; margin:0; color:var(--gray-700); font-size:var(--ft16); font-weight:var(--medium); }
:is(html.dark,body.dark) :is(.quantity_terms[data-v2="true"] .quantity_terms_input > input,.currency_editor_picker .select_main,.item_buy_popup .currency_purchase_amount_row > .qty_input) { background:var(--white); color:var(--gray-600); }
:is(html.dark,body.dark) :is(.quantity_terms[data-v2="true"] .quantity_terms_input > input,.currency_editor_picker .select_main,.item_buy_popup .currency_purchase_amount_row > .qty_input):not([aria-invalid="true"]) { border-color:var(--dark-line); }
:is(html.dark,body.dark) .item_buy_popup .currency_purchase_controls > button,
:is(html.dark,body.dark) .quantity_terms[data-v2="true"] .currency_input_presets > button:not(.currency_amount_reset) { background:var(--gray-100); border-color:var(--dark-line); color:var(--gray-600); }
:is(html.dark,body.dark) .quantity_terms[data-v2="true"] .currency_amount_reset { border-color:var(--dark-line); color:var(--gray-500); }
.quantity_terms[data-v2="true"] .currency_sale_v2 .quantity_terms_input > input:not(:disabled):not([readonly]):not([aria-invalid="true"]):hover,
.item_buy_popup .currency_purchase_amount_row > .qty_input:not(:disabled):not([readonly]):not([aria-invalid="true"]):hover { border-color:var(--gray-400); }
.quantity_terms[data-v2="true"] .currency_sale_v2 .quantity_terms_input > input:not(:disabled):not([readonly]):focus,
.item_buy_popup .currency_purchase_amount_row > .qty_input:not(:disabled):not([readonly]):focus { box-shadow:0 4px 20px 0 rgba(0,0,0,.10); }
.quantity_terms[data-v2="true"] .currency_sale_v2 .quantity_terms_input > input:not(:disabled):not([readonly]):not([aria-invalid="true"]):focus,
.item_buy_popup .currency_purchase_amount_row > .qty_input:not(:disabled):not([readonly]):not([aria-invalid="true"]):focus { border-color:var(--gray-400); }
.quantity_terms[data-v2="true"] .currency_sale_v2 .quantity_terms_input > input:disabled,
.quantity_terms[data-v2="true"] .currency_sale_v2 .quantity_terms_input > input[readonly],
.item_buy_popup .currency_purchase_amount_row > .qty_input:disabled,
.item_buy_popup .currency_purchase_amount_row > .qty_input[readonly] { background:var(--gray-100); border-color:var(--dark-line); color:var(--gray-500); -webkit-text-fill-color:var(--gray-500); cursor:not-allowed; box-shadow:none; opacity:1; }
