/* ==========================================================================
   마이페이지 전용 (v2) — 외주본 account.css(account-block·details·tabs·order-progress…) 위에
   우리 스크립트(원문 그대로)가 그리는 것들을 외주본 언어로: 탭 전환(.active) · 적립금 · 주소록 · 쿠폰함 ·
   주문 카드 · 내 후기 · 후기 작성 모달 · 사진 크게 보기 · 폼.
   ========================================================================== */

/* ── 머리·탭 (스크립트는 .active 로 전환한다) ───────────────────── */
.wm-account-sub { margin: 10px 0 0 !important; font-size: 13px !important; color: #999 !important; }
.account-tabs button.active { color: #111; border-color: #111; font-weight: 600; }
.account-section { display: none; }
.account-section.active { display: block; }
.account-page .text-mute,
.account-muted { font-size: 14px; color: #999; line-height: 1.8; margin: 0; }
.account-page .text-link { font-size: 14px; border-bottom: 1px solid #aaa; padding-bottom: 4px; }
.wm-mt-16 { margin-top: 16px; }
#btn-bp-add { margin-top: 16px; }

/* ── 적립금 ──────────────────────────────────────────── */
.pts-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; padding: 24px; background: #f3f2ef; }
.pts-card__main { display: flex; flex-direction: column; gap: 6px; }
.pts-card__label { font-size: 12px; letter-spacing: 1.3px; color: #666; }
.pts-card__bal { font-size: 28px; font-weight: 600; letter-spacing: -0.5px; }
.pts-card__bal small { margin-left: 2px; font-size: 14px; font-weight: 500; }
.pts-card__hint { font-size: 13px; color: #888; }
.pts-card__more { padding: 0 0 4px; border-bottom: 1px solid #aaa; font-size: 13px; white-space: nowrap; }
.pts-history { margin: -12px 0 24px; padding: 6px 24px; border: 1px solid #e5e5e5; }
.pts-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.pts-row:last-child { border-bottom: 0; }
.pts-row__l { color: #777; }
.pts-hwrap { padding: 8px 0; }

/* ── 폼 (프로필 수정 · 배송지 추가) — 외주본 account-form 위에 우리 칸 ──── */
.account-form .err { font-size: 13px; color: #b34635; }
.account-form input[type="tel"],
.account-form input[type="email"],
.account-form input[type="text"] { font: inherit; background: #fff; }
.account-form input:disabled,
.account-form input[readonly] { background: #fafafa; color: #777; }
.account-form input[readonly] { cursor: pointer; }
.wm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wm-field-row { display: flex; gap: 8px; }
.wm-field-row input { flex: 1; }
.wm-field-btn { flex: none; height: 46px; padding: 0 16px; border: 1px solid #171717; background: #171717; color: #fff; font-size: 14px; white-space: nowrap; }
.wm-form-actions { display: flex; gap: 8px; margin-top: 6px; }
.wm-form-actions .account-black-button { flex: 1; width: auto; margin: 0; }
.wm-form-actions .account-outline-button { width: auto; padding-inline: 18px; }
.addr-save__labels { display: flex; gap: 8px; align-items: center; }
.addr-label-btn { padding: 9px 16px; border: 1px solid #ddd; background: #fff; font-size: 14px; white-space: nowrap; }
.addr-label-btn.on { background: #171717; color: #fff; border-color: #171717; }
.addr-save__labels input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #ddd; background: #fff; font: inherit; font-size: 14px; }
.account-form .coupon-msg { font-size: 13px; color: #999; }
.account-form .coupon-msg[data-tone="ok"] { color: #2a8f4f; }
.account-form .coupon-msg[data-tone="err"] { color: #b34635; }
.acct-view__foot { margin-top: 4px; }

/* ── 주소록 (스크립트 .addr-item → 외주본 address-entry 모양) ─────── */
.addr-list { display: flex; flex-direction: column; }
.addr-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 0; border-bottom: 1px solid #eee; }
.addr-item:first-child { padding-top: 0; }
.addr-item:last-child { padding-bottom: 0; border-bottom: 0; }
.addr-item__main { min-width: 0; }
.addr-item__top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.addr-item__top b { font-size: 15px; font-weight: 600; }
.addr-item__def { padding: 2px 8px; background: #171717; color: #fff; font-size: 11px; }
.addr-item__name { font-size: 13px; color: #888; }
.addr-item__addr { margin-top: 6px; font-size: 14px; line-height: 1.8; color: #777; overflow-wrap: anywhere; }
.addr-item__act { display: flex; flex-direction: column; gap: 6px; flex: none; text-align: right; }
.lnk-btn { padding: 2px 0; font-size: 13px; color: #888; }
.lnk-btn:hover { color: #171717; }
.lnk-btn--del:hover { color: #b34635; }

/* ── 쿠폰함 (스크립트 .cpn-item → 외주본 coupon-ticket 모양) ─────── */
.cpn-item { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; padding: 20px; border: 1px solid #ddd; }
.cpn-item:last-child { margin-bottom: 0; }
.cpn-item__disc { flex: none; min-width: 90px; padding-right: 18px; border-right: 1px dashed #ccc; font-size: 26px; font-weight: 600; text-align: center; letter-spacing: -0.5px; }
.cpn-item__b { flex: 1; min-width: 0; }
.cpn-item__b b { font-size: 15px; font-weight: 600; }
.cpn-item__meta { display: block; margin-top: 6px; font-size: 12px; line-height: 1.6; color: #888; }
.cpn-item__st { flex: none; padding: 5px 10px; border: 1px solid #ccc; font-size: 12px; white-space: nowrap; }
.cpn-item.used { opacity: 0.45; }
.cpn-item.used .cpn-item__st { border-style: dashed; }

/* ── 주문 카드 (스크립트 .order-card) ─────────────────────── */
.order-progress { margin-bottom: 24px; }
#orders-list { margin-top: 0; }
.order-card { margin-bottom: 14px; border: 1px solid #e5e5e5; }
.oc-main { display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: start; padding: 22px; }
.oc-thumb { display: block; width: 64px; height: 80px; overflow: hidden; background: #f7f7f7; }
.oc-thumb img,
.oc-item__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.oc-body { min-width: 0; }
.order-card .ono { font-size: 15px; font-weight: 600; letter-spacing: 0.3px; }
.order-card .meta { margin-top: 4px; font-size: 13px; color: #999; }
.order-card .status { margin-top: 6px; font-size: 13px; font-weight: 500; color: #171717; }
.order-card .status--done { color: #999; }
.oc-track { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: #777; }
.oc-track b { font-weight: 600; color: #171717; }
.oc-track a { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.oc-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.oc-summary__txt { font-size: 13px; color: #777; }
.oc-toggle { padding: 4px 11px; border: 1px solid #ccc; font-size: 12px; white-space: nowrap; }
.oc-toggle:hover { background: #171717; color: #fff; border-color: #171717; }
.oc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.order-card .total { font-size: 16px; font-weight: 600; }
.link-btn { padding: 0; font-size: 12px; color: #888; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: #171717; }
.oc-rev { padding: 6px 12px; border: 1px solid #171717; background: #171717; color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; }
.oc-rev--done { background: transparent; color: #999; border-color: #ccc; cursor: default; }
.oc-detail { padding: 4px 22px 12px; border-top: 1px solid #eee; background: #fafafa; }
.oc-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.oc-item:last-child { border-bottom: 0; }
.oc-item__thumb { display: block; flex: none; width: 46px; height: 58px; overflow: hidden; background: #f0f0f0; }
.oc-item__info { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.oc-item__info b { overflow: hidden; font-size: 14px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.oc-item__info i { font-size: 12px; font-style: normal; color: #999; }
.oc-item__price { flex: none; font-size: 14px; font-weight: 500; }
.account-page .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; font-size: 14px; font-weight: 500; }
.account-page .btn-primary,
#review-modal .btn-primary { background: #171717; color: #fff; border: 1px solid #171717; }
.account-page .btn-ghost,
#review-modal .btn-ghost { border: 1px solid #ccc; }

/* ── 내 후기 (스크립트 .myrv → 외주본 account-my-review 모양) ─────── */
.myrv { padding: 25px 0; border-bottom: 1px solid #e5e5e5; }
.myrv:first-child { border-top: 1px solid #e5e5e5; }
.myrv__top { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: #888; }
.myrv__name { margin: 12px 0 8px; font-size: 16px; font-weight: 600; }
.myrv__del { padding: 0; font-size: 13px; color: #888; }
.myrv__del:hover { color: #b34635; }
.rv-item__stars { color: #171717; letter-spacing: 1px; }
.rv-item__opt,
.rv-item__date { font-size: 13px; color: #999; }
.rv-item__body { margin: 10px 0 0; font-size: 15px; line-height: 1.9; color: #666; white-space: pre-line; }
.rv-item__photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rv-photo { width: auto; height: 90px; max-width: 180px; object-fit: contain; background: #f4f4f4; cursor: zoom-in; }
.rv-lightbox { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 24px; background: #000d; cursor: zoom-out; }
.rv-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.rv-lightbox__close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; color: #fff; font-size: 22px; }

/* ── 후기 작성 모달 (스크립트 #review-modal .rvm__*) ─────────────── */
#review-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.rvm__backdrop { position: absolute; inset: 0; background: #0006; }
.rvm__card { position: relative; width: 100%; max-width: 480px; max-height: 90dvh; overflow-y: auto; padding: 32px; background: #fff; }
.rvm__x { position: absolute; top: 14px; right: 16px; padding: 4px; font-size: 20px; color: #999; }
.rvm__title { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.rvm__prod { margin: 0 0 16px; font-size: 14px; }
.rvm__prod span { display: block; margin-top: 3px; font-size: 12px; color: #999; }
.rvm__stars { display: flex; gap: 4px; margin-bottom: 14px; }
.rvm__stars button { padding: 0; font-size: 30px; line-height: 1; color: #ddd; }
.rvm__stars button.on { color: #171717; }
.rvm__card textarea { width: 100%; min-height: 110px; padding: 12px; border: 1px solid #ddd; border-radius: 0; background: #fff; font: inherit; font-size: 14px; resize: vertical; }
.rvm__hw { display: flex; gap: 8px; margin-top: 10px; }
.rvm__hw input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #ddd; border-radius: 0; font: inherit; font-size: 14px; }
.rvm__act { display: flex; gap: 10px; margin-top: 16px; }
.rvm__act .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; font-size: 14px; font-weight: 500; }
.rvm__note { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: #999; }
.rvm__photos { margin-top: 12px; }
.rvm__thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.rvm__thumb { position: relative; width: 64px; height: 64px; }
.rvm__thumb img { width: 64px; height: 64px; border: 1px solid #ddd; object-fit: cover; }
.rvm__thumb button { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: #111; color: #fff; font-size: 11px; line-height: 1; }
.rvm__add { display: inline-block; margin-top: 10px; padding: 8px 12px; border: 1px dashed #bbb; font-size: 12px; color: #777; cursor: pointer; }
.rvm__add:hover { border-color: #171717; color: #171717; }

@media (max-width: 767px) {
    .pts-card { flex-wrap: wrap; padding: 20px 16px; }
    .pts-history { padding: 6px 16px; }
    .oc-main { grid-template-columns: 56px 1fr; gap: 14px; padding: 18px 16px; }
    .oc-thumb { width: 56px; height: 70px; }
    .oc-right { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
    .oc-detail { padding: 4px 16px 12px; }
    .wm-form-row { grid-template-columns: 1fr; }
    .cpn-item { gap: 14px; padding: 16px; }
    .cpn-item__disc { min-width: 70px; padding-right: 12px; font-size: 22px; }
    .account-help { flex-direction: column; align-items: flex-start; }
}

/* ── 어두운 화면 ─────────────────────────────────────────── */
[data-theme="dark"] .account-block,
[data-theme="dark"] .order-card,
[data-theme="dark"] .cpn-item,
[data-theme="dark"] .pts-history,
[data-theme="dark"] .rvm__card,
[data-theme="dark"] .rvm__card textarea,
[data-theme="dark"] .rvm__hw input,
[data-theme="dark"] .account-form input,
[data-theme="dark"] .addr-label-btn,
[data-theme="dark"] .addr-save__labels input,
[data-theme="dark"] .account-section-heading select { background: #161616; border-color: #333; color: #eee; }
[data-theme="dark"] .account-block-heading,
[data-theme="dark"] .account-details > div,
[data-theme="dark"] .addr-item,
[data-theme="dark"] .oc-item,
[data-theme="dark"] .pts-row,
[data-theme="dark"] .myrv,
[data-theme="dark"] .account-tabs,
[data-theme="dark"] .account-empty,
[data-theme="dark"] .account-help { border-color: #2a2a2a; }
[data-theme="dark"] .account-event,
[data-theme="dark"] .pts-card,
[data-theme="dark"] .order-progress { background: #1a1a19; }
[data-theme="dark"] .oc-detail { background: #121212; border-top-color: #2a2a2a; }
[data-theme="dark"] .oc-thumb,
[data-theme="dark"] .oc-item__thumb,
[data-theme="dark"] .rv-photo { background: #1c1c1c; }
[data-theme="dark"] .account-tabs button.active,
[data-theme="dark"] .account-heading p strong,
[data-theme="dark"] .account-event strong,
[data-theme="dark"] .account-caption b,
[data-theme="dark"] .order-card .status,
[data-theme="dark"] .oc-track b,
[data-theme="dark"] .rv-item__stars,
[data-theme="dark"] .rvm__stars button.on,
[data-theme="dark"] .account-form input:disabled { color: #eee; }
[data-theme="dark"] .account-tabs button.active { border-color: #eee; }
[data-theme="dark"] .account-form input:disabled,
[data-theme="dark"] .account-form input[readonly] { background: #111; }
[data-theme="dark"] .account-avatar,
[data-theme="dark"] .account-black-button,
[data-theme="dark"] .addr-item__def,
[data-theme="dark"] .addr-label-btn.on,
[data-theme="dark"] .wm-field-btn,
[data-theme="dark"] .oc-rev,
[data-theme="dark"] .oc-toggle:hover,
[data-theme="dark"] .account-small-button:hover,
[data-theme="dark"] .account-page .btn-primary,
[data-theme="dark"] #review-modal .btn-primary { background: #eee; color: #111; border-color: #eee; }
[data-theme="dark"] .oc-rev--done { background: transparent; color: #999; border-color: #444; }
[data-theme="dark"] .account-outline-button,
[data-theme="dark"] .account-small-button,
[data-theme="dark"] .oc-toggle,
[data-theme="dark"] .cpn-item__st,
[data-theme="dark"] .account-page .btn-ghost,
[data-theme="dark"] #review-modal .btn-ghost { border-color: #555; color: #eee; }
[data-theme="dark"] .account-event > span:first-child,
[data-theme="dark"] .order-progress > div { border-color: #333; }
[data-theme="dark"] .cpn-item__disc { border-right-color: #444; }
[data-theme="dark"] .pts-card__more,
[data-theme="dark"] .account-page .text-link { border-bottom-color: #666; }
