.bigone-nengajo-calculator { border: 1px solid #d8d8d8; margin: 1.5em 0; padding: 1.25em; }
.bigone-nengajo-calculator fieldset { border: 0; margin: 0 0 1em; padding: 0; }
.bigone-nengajo-calculator legend { font-weight: 700; margin-bottom: .5em; }
.bigone-nengajo-calculator label { display: block; margin: .35em 0; }
.bigone-nengajo-calculator input[type="number"], .bigone-nengajo-calculator select { max-width: 16rem; width: 100%; }
.bigone-nengajo-total { font-size: 1.25em; margin: 1em 0 .25em; }
.bigone-nengajo-total strong { font-size: 1.35em; }
.bigone-nengajo-period { color: #666; font-size: .9em; }

.bigone-nengajo-sender { border-top: 2px solid #333; margin-top: 2em; padding-top: 1.5em; }
.bigone-nengajo-sender h3 { margin: 0 0 .5em; }
.bigone-nengajo-sender > p { margin-bottom: 1.25em; }

.bigone-designs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.bigone-design-card { border: 1px solid #ddd; padding: .75rem; }
.bigone-design-card:has(input:checked) { outline: 2px solid #333; }
.bigone-design-card img { display: block; width: 100%; height: 200px; object-fit: contain; }
.bigone-design-card span, .bigone-design-card small { display: block; }

.bigone-design-card[hidden] { display: none; }
.p-entry-product-images--main-item img.bigone-selected-design-preview { object-fit: contain; }
@media (min-width: 768px) {
    .p-entry-product-images--main-item img.bigone-selected-design-preview { display: block; width: var(--bigone-preview-width, 80%); height: auto; margin-inline: auto; }
}
.bigone-design-dialog { width: calc(100vw - 24px); max-width: 560px; max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 8px; color: #222; background: #fff; box-sizing: border-box; overflow: auto; }
.bigone-design-dialog::backdrop { background: rgba(0,0,0,.7); }
.bigone-design-dialog-content { padding: 12px; }
.bigone-design-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.bigone-design-dialog-header p { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.bigone-design-dialog-close { flex: none; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 4px; background: #ff6600; color: #ffffff; font-size: 14px; cursor: pointer; }
.bigone-design-dialog-image { display: block; width: 100%; height: auto; max-height: calc(100dvh - 180px); object-fit: contain; margin: 0 auto; }
.bigone-design-dialog-note { margin: 10px 0 0; font-size: 12px; line-height: 1.6; }
.bigone-design-filter { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.bigone-design-filter legend { width: 100%; }
@media (max-width: 480px) { .bigone-designs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; } .bigone-design-card img { height: 165px; } }

.bigone-nengajo-calculator > p > label { font-weight: 700; }
.bigone-postcard-note { margin: 0 0 1em; padding: 12px; border-left: 3px solid #ff6600; background: #fff5ed; font-size: .9em; line-height: 1.7; }
.bigone-postcard-note p { margin: 0 0 .5em; }
.bigone-postcard-note p:last-child { margin-bottom: 0; }
.bigone-postcard-note[hidden] { display: none; }

.bigone-nengajo-calculator select[name="bigone_nengajo_postcard"] { max-width: 100%; width: 100%; }

.bigone-design-next-bar { position: fixed; bottom: var(--bigone-next-bottom, 80px); right: 20px; z-index: 9990; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 40px); box-sizing: border-box; padding: 12px; border: 1px solid #ff6600; border-radius: 6px; background: #fff; color: #222; box-shadow: 0 2px 12px #0003; }
.bigone-design-next-bar[hidden] { display: none; }
.bigone-design-next-label { font-size: 14px; }
.bigone-nengajo-calculator .bigone-design-next { min-height: 44px; padding: 12px 16px; border: 0; border-radius: 4px; background: #ff6600; color: #ffffff; font-size: 16px; font-weight: 700; cursor: pointer; line-height: 1.5; white-space: normal; }
.bigone-design-dialog .bigone-design-next { display: block; width: 100%; margin-top: 10px; }
#bigone_nengajo_quantity { scroll-margin-top: 150px; }
@media (max-width: 767px) {
 .bigone-design-next-bar { left: 12px; right: 12px; bottom: calc(var(--bigone-next-bottom, 80px) + env(safe-area-inset-bottom)); max-width: none; padding: 8px; gap: 8px; }
 .bigone-design-next-bar .bigone-design-next { flex: 1; padding: 10px; font-size: 14px; }
 .bigone-design-next-label { font-size: 12px; }
 .bigone-design-dialog-image { max-height: calc(100dvh - 260px); }
}

/* 注文確認表の金額列を確保し、通貨と数字の途中改行を防ぐ。 */
.woocommerce table.woocommerce-checkout-review-order-table { table-layout: fixed; width: 100%; }
.woocommerce table.woocommerce-checkout-review-order-table .product-name { width: auto; overflow-wrap: anywhere; word-break: normal; }
.woocommerce table.woocommerce-checkout-review-order-table th:last-child,
.woocommerce table.woocommerce-checkout-review-order-table td:last-child { box-sizing: border-box; width: 8em; padding-left: 12px; padding-right: 12px; text-align: right; white-space: nowrap; }
.woocommerce table.woocommerce-checkout-review-order-table .amount,
.woocommerce table.woocommerce-checkout-review-order-table .amount bdi { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
