/* Final control layer shared by the Korean and English Equation services. */
.product-ui-site {
    --control-height: 46px;
    --control-radius: 8px;
    --control-border: #cfd8e6;
    --control-border-hover: #9eb2cf;
    --control-surface: #ffffff;
    --control-surface-soft: #f7f9fc;
    --control-text: #24344d;
    --control-muted: #718096;
    --control-danger: #c23d4b;
    --control-danger-hover: #9f2735;
    --control-danger-soft: #fff3f4;
}

.product-ui-site :where(button, input, select, textarea) {
    font-family: inherit;
    letter-spacing: 0;
}

.product-ui-site main :where(
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    select,
    textarea
) {
    min-height: var(--control-height);
    border: 1px solid var(--control-border);
    border-radius: var(--control-radius);
    background-color: var(--control-surface);
    color: var(--control-text);
    font-size: 14px;
    line-height: 1.45;
    box-shadow: inset 0 1px 2px rgba(16, 36, 72, 0.035), 0 1px 1px rgba(16, 36, 72, 0.025);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.product-ui-site main :where(
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="time"]
) {
    padding: 0 13px;
}

/* Preserve the icon gutter used by login and signup fields. */
.product-ui-site main .auth-input-wrap > :where(input, select) {
    padding-left: 42px;
}

.product-ui-site main textarea {
    min-height: 112px;
    padding: 12px 13px;
    resize: vertical;
}

.product-ui-site main select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 42px 0 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 17px;
    cursor: pointer;
}

.product-ui-site main :where(input, select, textarea):hover:not(:disabled) {
    border-color: var(--control-border-hover);
}

.product-ui-site main :where(input, select, textarea):focus {
    border-color: var(--service-action);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--service-action) 16%, transparent), 0 5px 14px rgba(16, 36, 72, 0.08);
}

.product-ui-site main :where(input, textarea)::placeholder {
    color: #98a2b3;
    opacity: 1;
}

.product-ui-site main :where(input, select, textarea):disabled {
    border-color: #dde3ec;
    background-color: #f1f3f6;
    color: #98a2b3;
    box-shadow: none;
    cursor: not-allowed;
}

.product-ui-site main :where(input[type="checkbox"], input[type="radio"]) {
    width: 18px;
    height: 18px;
    accent-color: var(--service-action);
}

.product-ui-site :where(
    .primary-btn,
    .materials-primary-btn,
    .cash-charge-primary,
    .auth-submit-btn,
    .qna-write-btn,
    .qna-write-open-btn-accent,
    .notice-submit-btn,
    .upload-submit-btn,
    .notification-save-btn,
    .settings-save-btn,
    .settlement-request-submit,
    .sms-test-send-btn,
    .admin-password-apply-btn,
    .member-save-btn,
    .assigned-filter-btn.primary,
    .payment-action-btn.complete,
    .payment-action-btn.request-confirmation,
    .subject-save-btn,
    .kor-btn-primary,
    .kor-btn-search,
    .kor-btn-upload,
    .kor-empty-action,
    .kor-selected-btn.is-primary,
    .kor-upload-primary,
    .kor-purchase-confirm,
    .kor-login-submit,
    .phone-code-send-btn,
    .phone-code-verify-btn,
    .username-check-btn,
    .social-choice-btn.primary,
    .sms-test-open-btn,
    .popup-image-file-btn,
    .profile-file-btn,
    .course-id-btn,
    .user-sms-open-btn,
    .korean-sync-button.is-primary,
    .textbook-order-btn,
    .tuition-payment-btn:not(.muted),
    .materials-upload-btn
) {
    display: inline-flex;
    min-height: var(--control-height);
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid var(--service-action);
    border-radius: var(--control-radius);
    background: var(--service-action);
    color: #fff;
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 7px 16px var(--service-action-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-ui-site :where(
    .secondary-btn,
    .materials-secondary-btn,
    .qna-write-open-btn.muted,
    .settlement-request-cancel,
    .sms-test-cancel-btn,
    .sms-test-close-btn,
    .assigned-filter-btn.subtle,
    .admin-preview-btn,
    .kor-btn-ghost,
    .kor-btn-reset,
    .kor-selected-btn.is-secondary,
    .kor-upload-secondary,
    .kor-purchase-cancel,
    .social-choice-btn.secondary,
    .social-choice-btn.ghost,
    .social-cancel-btn,
    .popup-image-remove-btn,
    .korean-sync-button.is-folder,
    .korean-sync-button.is-secondary,
    .korean-sync-button.is-mirror,
    .textbook-cart-btn,
    .textbook-share-btn,
    .tuition-payment-btn.muted,
    .settlement-request-btn,
    .cash-detail-btn
) {
    display: inline-flex;
    min-height: var(--control-height);
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--control-border);
    border-radius: var(--control-radius);
    background: #fff;
    color: var(--control-text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 3px 9px rgba(16, 36, 72, 0.06);
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-ui-site :where(
    .danger-btn,
    .delete-btn,
    .materials-danger-btn,
    .qna-delete-btn,
    .qna-answer-delete-btn,
    .payment-action-btn.cancel,
    .subject-delete-btn,
    .materials-file-delete-btn
) {
    display: inline-flex;
    min-height: var(--control-height);
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid #efb8be;
    border-radius: var(--control-radius);
    background: var(--control-danger-soft);
    color: var(--control-danger);
    font-size: 14px;
    font-weight: 820;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 3px 9px rgba(194, 61, 75, 0.07);
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-ui-site :where(
    .primary-btn,
    .materials-primary-btn,
    .cash-charge-primary,
    .auth-submit-btn,
    .qna-write-btn,
    .qna-write-open-btn-accent,
    .notice-submit-btn,
    .upload-submit-btn,
    .notification-save-btn,
    .settings-save-btn,
    .settlement-request-submit,
    .sms-test-send-btn,
    .admin-password-apply-btn,
    .member-save-btn,
    .assigned-filter-btn.primary,
    .payment-action-btn.complete,
    .payment-action-btn.request-confirmation,
    .subject-save-btn,
    .kor-btn-primary,
    .kor-btn-search,
    .kor-btn-upload,
    .kor-empty-action,
    .kor-selected-btn.is-primary,
    .kor-upload-primary,
    .kor-purchase-confirm,
    .kor-login-submit,
    .phone-code-send-btn,
    .phone-code-verify-btn,
    .username-check-btn,
    .social-choice-btn.primary,
    .sms-test-open-btn,
    .popup-image-file-btn,
    .profile-file-btn,
    .course-id-btn,
    .user-sms-open-btn,
    .korean-sync-button.is-primary,
    .textbook-order-btn,
    .tuition-payment-btn:not(.muted),
    .materials-upload-btn
):hover {
    border-color: var(--service-action-hover);
    background: var(--service-action-hover);
    box-shadow: 0 11px 22px var(--service-action-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.product-ui-site :where(
    .secondary-btn,
    .materials-secondary-btn,
    .qna-write-open-btn.muted,
    .settlement-request-cancel,
    .sms-test-cancel-btn,
    .sms-test-close-btn,
    .assigned-filter-btn.subtle,
    .admin-preview-btn,
    .kor-btn-ghost,
    .kor-btn-reset,
    .kor-selected-btn.is-secondary,
    .kor-upload-secondary,
    .kor-purchase-cancel,
    .social-choice-btn.secondary,
    .social-choice-btn.ghost,
    .social-cancel-btn,
    .popup-image-remove-btn,
    .korean-sync-button.is-folder,
    .korean-sync-button.is-secondary,
    .korean-sync-button.is-mirror,
    .textbook-cart-btn,
    .textbook-share-btn,
    .tuition-payment-btn.muted,
    .settlement-request-btn,
    .cash-detail-btn
):hover {
    border-color: var(--service-action);
    background: var(--service-action-soft);
    color: var(--service-action-hover);
    box-shadow: 0 7px 16px var(--service-action-shadow);
    transform: translateY(-1px);
}

.product-ui-site :where(
    .danger-btn,
    .delete-btn,
    .materials-danger-btn,
    .qna-delete-btn,
    .qna-answer-delete-btn,
    .payment-action-btn.cancel,
    .subject-delete-btn,
    .materials-file-delete-btn
):hover {
    border-color: var(--control-danger);
    background: var(--control-danger);
    color: #fff;
    box-shadow: 0 8px 18px rgba(194, 61, 75, 0.18);
    transform: translateY(-1px);
}

.product-ui-site :where(
    .primary-btn,
    .secondary-btn,
    .danger-btn,
    .table-btn,
    .materials-primary-btn,
    .materials-secondary-btn,
    .materials-danger-btn,
    .cash-charge-primary,
    .auth-submit-btn,
    .qna-write-btn,
    .qna-write-open-btn,
    .payment-action-btn,
    .assigned-filter-btn,
    .kor-btn-primary,
    .kor-btn-search,
    .kor-btn-upload,
    .kor-btn-reset,
    .kor-selected-btn,
    .kor-upload-primary,
    .kor-upload-secondary,
    .kor-purchase-confirm,
    .kor-purchase-cancel,
    .kor-login-submit,
    .phone-code-send-btn,
    .phone-code-verify-btn,
    .username-check-btn,
    .social-choice-btn,
    .sms-test-open-btn,
    .popup-image-file-btn,
    .popup-image-remove-btn,
    .profile-file-btn,
    .course-id-btn,
    .user-sms-open-btn,
    .korean-sync-button,
    .textbook-cart-btn,
    .textbook-order-btn,
    .textbook-share-btn,
    .tuition-payment-btn,
    .materials-upload-btn,
    .materials-file-delete-btn,
    .settlement-request-btn,
    .cash-detail-btn
):active {
    box-shadow: none;
    transform: translateY(0);
}

.product-ui-site :where(
    .primary-btn,
    .secondary-btn,
    .danger-btn,
    .table-btn,
    .materials-primary-btn,
    .materials-secondary-btn,
    .materials-danger-btn,
    .cash-charge-primary,
    .auth-submit-btn,
    .qna-write-btn,
    .qna-write-open-btn,
    .payment-action-btn,
    .assigned-filter-btn,
    .kor-btn-primary,
    .kor-btn-search,
    .kor-btn-upload,
    .kor-btn-reset,
    .kor-selected-btn,
    .kor-upload-primary,
    .kor-upload-secondary,
    .kor-purchase-confirm,
    .kor-purchase-cancel,
    .kor-login-submit,
    .phone-code-send-btn,
    .phone-code-verify-btn,
    .username-check-btn,
    .social-choice-btn,
    .sms-test-open-btn,
    .popup-image-file-btn,
    .popup-image-remove-btn,
    .profile-file-btn,
    .course-id-btn,
    .user-sms-open-btn,
    .korean-sync-button,
    .textbook-cart-btn,
    .textbook-order-btn,
    .textbook-share-btn,
    .tuition-payment-btn,
    .materials-upload-btn,
    .materials-file-delete-btn,
    .settlement-request-btn,
    .cash-detail-btn
):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--service-action) 24%, transparent);
    outline-offset: 2px;
}

.product-ui-site :where(button, [role="button"], a)[disabled],
.product-ui-site :where(button, [role="button"], a)[aria-disabled="true"] {
    border-color: #d9e0e9;
    background: #eef1f5;
    color: #98a2b3;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
    pointer-events: none;
    transform: none;
}

.product-ui-site form[data-submit-locked="true"] :is(button[type="submit"], input[type="submit"]) {
    cursor: wait;
    pointer-events: none;
}

.product-ui-site form[data-submit-locked="true"] button[type="submit"]::after {
    content: "";
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: product-submit-spin 0.75s linear infinite;
}

@keyframes product-submit-spin {
    to { transform: rotate(360deg); }
}

.product-ui-site :where(.table-btn, .payment-action-btn) {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 12px;
}

.product-ui-site :where(
    .phone-code-send-btn,
    .phone-code-verify-btn,
    .username-check-btn,
    .social-choice-btn,
    .sms-test-open-btn,
    .popup-image-file-btn,
    .popup-image-remove-btn,
    .profile-file-btn,
    .course-id-btn,
    .user-sms-open-btn,
    .korean-sync-button,
    .textbook-cart-btn,
    .textbook-order-btn,
    .textbook-share-btn,
    .tuition-payment-btn,
    .materials-upload-btn,
    .settlement-request-btn,
    .cash-detail-btn
) {
    min-height: var(--control-height);
    border-radius: var(--control-radius);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
}

.product-ui-site :where(
    .search-icon-btn,
    .secret-visibility-btn,
    .materials-icon-btn,
    .modal-close-btn,
    .detail-close-btn,
    .sms-test-close-btn
) {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 8px;
}

.product-ui-site .user-filter-field #userSearchApplyBtn {
    bottom: 0;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
}

.product-ui-site .ui-search--compact > :is(
    input[type="search"],
    input[type="text"],
    select,
    button
) {
    height: calc(var(--control-height) - 2px) !important;
    min-height: calc(var(--control-height) - 2px) !important;
}

.product-ui-site .kor-filter-search.ui-search--compact .kor-input {
    padding-right: 13px;
}

.product-ui-site .kor-filter-search.ui-search--compact .kor-btn-search {
    position: static;
    inset: auto;
    flex: 0 0 auto;
}

.product-ui-site .kor-filter-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px 18px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(16, 36, 72, 0.055);
}

.product-ui-site .kor-tools-left,
.product-ui-site .kor-tools-right {
    gap: 9px;
}

.product-ui-site .kor-filter-panel .kor-select {
    min-height: var(--control-height);
    border-color: var(--control-border);
    border-radius: var(--control-radius);
    background-color: #fff;
    color: var(--control-text);
    font-weight: 700;
    box-shadow: inset 0 1px 2px rgba(16, 36, 72, 0.035);
}

.product-ui-site .kor-result-summary > .kor-select:first-child {
    min-width: 78px;
}

.product-ui-site .kor-filter-search {
    position: relative;
    display: flex;
    min-width: 240px;
    flex: 1 1 320px;
}

.product-ui-site .kor-filter-search .kor-input {
    width: 100%;
    min-width: 0;
    min-height: var(--control-height);
    padding-right: 84px;
    padding-left: 40px;
    border-radius: var(--control-radius);
}

.product-ui-site .kor-filter-search .kor-btn-search {
    position: absolute;
    top: 4px;
    right: 4px;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 6px;
    box-shadow: 0 4px 10px var(--service-action-shadow);
}

.product-ui-site .kor-btn-reset {
    min-width: 76px;
    min-height: var(--control-height);
    border-color: var(--control-border);
    background: #fff;
    color: var(--control-muted);
}

.product-ui-site .kor-selected-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0 0;
    padding: 14px 16px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: linear-gradient(90deg, #fff 0%, var(--service-action-soft) 100%);
    box-shadow: 0 8px 22px rgba(16, 36, 72, 0.06);
}

.product-ui-site .kor-selected-actions p {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.product-ui-site .kor-selected-actions p strong {
    color: var(--control-text);
    font-size: 14px;
}

.product-ui-site .kor-selected-actions p span {
    color: var(--control-muted);
    font-size: 12px;
}

.product-ui-site .kor-selected-actions > div {
    display: flex;
    gap: 9px;
}

.product-ui-site .kor-selected-btn {
    min-width: 132px;
}

/* Header utility controls use the same action hierarchy as page controls. */
.product-ui-site .header-balance-group {
    min-height: 42px;
    gap: 6px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.product-ui-site .header-cash-balance,
.product-ui-site .header-bonus-balance {
    display: inline-grid;
    grid-template-columns: 26px auto;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 5px 10px;
    border: 1px solid #d9e3f0;
    border-radius: 11px;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.065);
    font-family: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.product-ui-site .header-cash-balance {
    grid-template-columns: 26px auto 18px;
}

.product-ui-site .header-cash-balance::after,
.product-ui-site .header-bonus-balance::before {
    content: none;
}

.product-ui-site .header-balance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
}

.product-ui-site .header-balance-icon.cash {
    background: #eaf3ff;
    color: #2563eb;
}

.product-ui-site .header-balance-icon.point {
    background: #f2edff;
    color: #7c3aed;
}

.product-ui-site .header-balance-copy {
    display: grid;
    gap: 1px;
    min-width: 44px;
    text-align: left;
    line-height: 1.05;
}

.product-ui-site .header-balance-copy small {
    color: #7b8798;
    font-size: 9px;
    font-weight: 800;
}

.product-ui-site .header-balance-copy strong {
    color: #172033;
    font-size: 13px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.product-ui-site .header-balance-recharge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.product-ui-site .header-cash-balance:hover,
.product-ui-site .header-cash-balance:focus-visible,
.product-ui-site .header-bonus-balance:hover,
.product-ui-site .header-bonus-balance:focus-visible {
    border-color: #b9ccea;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
    outline: none;
    transform: translateY(-1px);
}

.product-ui-site .header-payment-btn {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--service-action);
    border-radius: 8px;
    background: var(--service-action);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 7px 16px var(--service-action-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.product-ui-site .header-payment-btn:hover {
    border-color: var(--service-action-hover);
    background: var(--service-action-hover);
    box-shadow: 0 10px 20px var(--service-action-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* Mypage history filters: date presets stay quiet until selected. */
.product-ui-site .mypage-history-filter {
    gap: 11px;
    padding: 14px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 #fff;
}

.product-ui-site .mypage-date-row,
.product-ui-site .mypage-search-row {
    gap: 8px;
}

.product-ui-site .mypage-history-filter :where(input, select) {
    min-height: 42px;
    border-color: var(--control-border);
    border-radius: 8px;
    background-color: #fff;
    color: var(--control-text);
    box-shadow: inset 0 1px 2px rgba(16, 36, 72, 0.035);
}

.product-ui-site .mypage-history-filter button {
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: #fff;
    color: #4b5d75;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(16, 36, 72, 0.045);
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-ui-site .mypage-date-row button[type="button"] {
    background: #fff;
    color: #52647c;
}

.product-ui-site .mypage-date-row button[type="button"]:hover {
    border-color: var(--service-action);
    background: var(--service-action-soft);
    color: var(--service-action-hover);
    box-shadow: 0 5px 12px var(--service-action-shadow);
    transform: translateY(-1px);
}

.product-ui-site .mypage-history-filter .mypage-date-row button[type="button"].is-active,
.product-ui-site .mypage-history-filter .mypage-date-row button[type="button"][aria-pressed="true"] {
    border-color: var(--service-action);
    background: var(--service-action);
    color: #fff;
    box-shadow: 0 7px 16px var(--service-action-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.product-ui-site .mypage-history-filter button.search,
.product-ui-site .mypage-history-filter button[type="submit"] {
    border-color: var(--service-action);
    background: var(--service-action);
    color: #fff;
    box-shadow: 0 6px 14px var(--service-action-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.product-ui-site .mypage-history-filter button.search:hover,
.product-ui-site .mypage-history-filter button[type="submit"]:hover {
    border-color: var(--service-action-hover);
    background: var(--service-action-hover);
    box-shadow: 0 9px 18px var(--service-action-shadow);
    transform: translateY(-1px);
}

.product-ui-site .mypage-history-filter button[type="reset"] {
    border-color: var(--control-border);
    background: #fff;
    color: var(--control-muted);
    box-shadow: 0 2px 6px rgba(16, 36, 72, 0.045);
}

.product-ui-site .mypage-history-filter button[type="reset"]:hover {
    border-color: var(--service-action-border);
    background: var(--service-action-soft);
    color: var(--service-action-hover);
}

/* Compact Lucide-style action glyphs keep repeated commands recognizable. */
.product-ui-site :is(
    .mypage-history-filter button.search,
    .mypage-history-filter button[type="submit"],
    .kor-btn-search
)::before,
.product-ui-site :is(
    .mypage-history-filter button[type="reset"],
    .kor-btn-reset,
    .user-filter-reset
)::before,
.product-ui-site :is(
    .mypage-saved-delete,
    .delete-btn,
    .danger-btn,
    .materials-danger-btn,
    .materials-file-delete-btn,
    .notice-delete-btn,
    .subject-delete-btn
)::before,
.product-ui-site :is(
    .mypage-saved-pay,
    .cash-charge-primary,
    .textbook-order-btn,
    .tuition-payment-btn,
    .payment-action-btn.complete
)::before,
.product-ui-site :is(
    .member-save-btn,
    .settings-save-btn,
    .notification-save-btn,
    .notice-submit-btn,
    .subject-save-btn
)::before,
.product-ui-site :is(
    .kor-btn-upload,
    .materials-upload-btn,
    .upload-submit-btn,
    .popup-image-file-btn
)::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background: currentColor;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.product-ui-site :is(
    .mypage-history-filter button.search,
    .mypage-history-filter button[type="submit"],
    .kor-btn-search
)::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

.product-ui-site :is(
    .mypage-history-filter button[type="reset"],
    .kor-btn-reset,
    .user-filter-reset
)::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
}

.product-ui-site :is(
    .mypage-saved-delete,
    .delete-btn,
    .danger-btn,
    .materials-danger-btn,
    .materials-file-delete-btn,
    .notice-delete-btn,
    .subject-delete-btn
)::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v5M14 11v5'/%3E%3C/svg%3E");
}

.product-ui-site :is(
    .mypage-saved-pay,
    .cash-charge-primary,
    .textbook-order-btn,
    .tuition-payment-btn,
    .payment-action-btn.complete
)::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20M6 15h2'/%3E%3C/svg%3E");
}

.product-ui-site :is(
    .member-save-btn,
    .settings-save-btn,
    .notification-save-btn,
    .notice-submit-btn,
    .subject-save-btn
)::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2Z'/%3E%3Cpath d='M17 21v-8H7v8M7 3v5h8'/%3E%3C/svg%3E");
}

.product-ui-site :is(
    .kor-btn-upload,
    .materials-upload-btn,
    .upload-submit-btn,
    .popup-image-file-btn
)::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 8l5-5 5 5M5 21h14a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2'/%3E%3C/svg%3E");
}

.product-ui-site :is(
    .mypage-history-filter button.search,
    .mypage-history-filter button[type="submit"],
    .mypage-history-filter button[type="reset"],
    .kor-btn-search,
    .kor-btn-reset,
    .mypage-saved-delete,
    .mypage-saved-pay,
    .cash-charge-primary,
    .member-save-btn,
    .settings-save-btn,
    .notification-save-btn,
    .delete-btn,
    .danger-btn,
    .materials-upload-btn,
    .upload-submit-btn
) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.product-ui-site .mypage-date-row > span {
    color: #7b8798;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

.product-ui-site .mypage-table-top select {
    min-height: 38px;
    padding-right: 38px;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background-color: #fff;
    color: var(--control-text);
    font-weight: 750;
}

.product-ui-site .mypage-saved-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: linear-gradient(90deg, #fff 0%, var(--service-action-soft) 100%);
    box-shadow: 0 8px 22px rgba(16, 36, 72, 0.06);
}

.product-ui-site .mypage-saved-delete,
.product-ui-site .mypage-saved-pay {
    display: inline-flex;
    min-width: 112px;
    min-height: var(--control-height);
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: var(--control-radius);
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-ui-site .mypage-saved-delete {
    border: 1px solid #efb8be;
    background: var(--control-danger-soft);
    color: var(--control-danger);
    box-shadow: 0 3px 9px rgba(194, 61, 75, 0.07);
}

.product-ui-site .mypage-saved-delete:hover {
    border-color: var(--control-danger);
    background: var(--control-danger);
    color: #fff;
    box-shadow: 0 8px 18px rgba(194, 61, 75, 0.18);
    transform: translateY(-1px);
}

.product-ui-site .mypage-saved-pay {
    margin-left: auto;
    border: 1px solid var(--service-action);
    background: var(--service-action);
    color: #fff;
    box-shadow: 0 7px 16px var(--service-action-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.product-ui-site .mypage-saved-pay:hover {
    border-color: var(--service-action-hover);
    background: var(--service-action-hover);
    box-shadow: 0 10px 20px var(--service-action-shadow);
    transform: translateY(-1px);
}

.product-ui-site .mypage-saved-actions :where(.mypage-saved-delete, .mypage-saved-pay):disabled {
    border-color: #d9e0e9;
    background: #eef1f5;
    color: #98a2b3;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Keep the mypage navigation on the same service palette in both sites. */
.product-ui-site .mypage-legacy-side {
    gap: 0;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 36, 72, 0.08);
}

.product-ui-site .mypage-legacy-side > h2 {
    min-height: 72px;
    margin: 0;
    padding: 0 18px;
    display: flex;
    align-items: center;
    background: var(--service-action-hover);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.product-ui-site .mypage-menu-block,
.product-ui-site .mypage-menu-block.secondary,
.product-ui-site .mypage-menu-block.buyer-identifier-menu {
    margin: 0;
    padding: 7px;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.product-ui-site .mypage-menu-block + .mypage-menu-block {
    border-top: 1px solid #e5eaf1;
}

.product-ui-site .mypage-legacy-side a {
    position: relative;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    color: #475467;
    font-size: 13px;
    font-weight: 750;
}

.product-ui-site .mypage-menu-block a + a {
    border-top: 0;
}

.product-ui-site .mypage-legacy-side a:hover,
.product-ui-site .mypage-legacy-side a.active {
    background: var(--service-action-soft);
    color: var(--service-action-hover);
}

.product-ui-site .mypage-legacy-side a.active {
    font-weight: 850;
}

.product-ui-site .mypage-legacy-side a.active::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 11px;
    width: 6px;
    height: 6px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}

/* Profile has no legacy side navigation. Keep it in one column even though this
   stylesheet loads after the page-specific account styles. */
.product-ui-site .mypage-legacy-shell.is-profile {
    width: min(1040px, calc(100% - 40px));
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.product-ui-site .mypage-legacy-shell.is-profile .mypage-legacy-main,
.product-ui-site .mypage-legacy-shell.is-profile .member-view-container {
    width: 100%;
    max-width: none;
}

.product-ui-site .profile-file-btn {
    width: 40px;
    height: 40px;
    min-height: 40px;
    flex: 0 0 40px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
}

.product-ui-site .profile-file-btn .profile-camera-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.product-ui-site .payment-refund-request-btn {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--service-action);
    border-radius: 7px;
    background: var(--service-action);
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    box-shadow: 0 4px 10px var(--service-action-shadow);
}

@media (max-width: 1080px) {
    .product-ui-site .kor-filter-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .product-ui-site {
        --control-height: 44px;
    }

    .product-ui-site .kor-filter-panel {
        gap: 10px;
        padding: 12px;
    }

    .product-ui-site .kor-tools-right {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .product-ui-site .kor-filter-search {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .product-ui-site .kor-btn-reset {
        width: 100%;
    }

    .product-ui-site .kor-selected-actions {
        position: sticky;
        bottom: 10px;
        z-index: 20;
        padding: 11px;
        box-shadow: 0 14px 30px rgba(16, 36, 72, 0.16);
    }

    .product-ui-site .kor-selected-actions p {
        display: none;
    }

    .product-ui-site .kor-selected-actions > div {
        width: 100%;
    }

    .product-ui-site .kor-selected-btn {
        min-width: 0;
        flex: 1 1 0;
        padding: 0 10px;
    }

    .product-ui-site .mypage-date-row,
    .product-ui-site .mypage-search-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-ui-site .mypage-date-row input,
    .product-ui-site .mypage-search-row input {
        min-width: 0;
        width: 100%;
    }

    .product-ui-site .mypage-saved-actions {
        padding: 11px;
    }

    .product-ui-site .mypage-legacy-side {
        border-radius: 8px;
    }

    .product-ui-site .mypage-saved-delete,
    .product-ui-site .mypage-saved-pay {
        min-width: 0;
        flex: 1 1 0;
    }

    .product-ui-site .auth-area > .user-menu-btn {
        max-width: 108px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .product-ui-site .auth-area > .logout-btn {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        border: 1px solid var(--control-border);
        background: #fff;
        font-size: 0;
        box-shadow: 0 3px 9px rgba(16, 36, 72, 0.06);
    }

    .product-ui-site .auth-area > .logout-btn::before {
        content: "";
        display: block;
        width: 16px;
        height: 16px;
        margin: auto;
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5M15 12H3M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5M15 12H3M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3C/svg%3E") center / contain no-repeat;
    }
}

/* Admin recipient selectors have a compact visual checkbox, but the whole
 * target must remain independently operable even when it is not wrapped by a
 * label. Keep this in the final control layer so table CSS cannot shrink it. */
body.product-ui-site .user-sms-select-cell input[type="checkbox"] {
    width: var(--ui-control-xs) !important;
    height: var(--ui-control-xs) !important;
    min-width: var(--ui-control-xs);
    min-height: var(--ui-control-xs);
}

@media (prefers-reduced-motion: reduce) {
    .product-ui-site :where(button, a, input, select, textarea) {
        transition: none;
    }
}

/* Premium finish shared by public, account, payment and admin controls. */
.product-ui-site { --control-radius: 11px; --control-border: #d3deeb; --control-border-hover: #9fb6d2; }
.product-ui-site main :where(input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], select, textarea) {
    box-shadow: 0 1px 2px rgba(15, 39, 68, .035), inset 0 1px 0 rgba(255,255,255,.8);
}
.product-ui-site :where(.primary-btn, .materials-primary-btn, .cash-charge-primary, .qna-write-btn, .notice-submit-btn, .upload-submit-btn, .notification-save-btn, .settings-save-btn, .member-save-btn, .assigned-filter-btn.primary, .kor-btn-primary, .kor-btn-search, .kor-btn-upload, .kor-empty-action, .kor-selected-btn.is-primary, .kor-upload-primary, .kor-purchase-confirm, .kor-login-submit, .sms-test-open-btn, .course-id-btn, .user-sms-open-btn, .textbook-order-btn, .tuition-payment-btn:not(.muted), .materials-upload-btn) {
    border-radius: var(--control-radius);
    background: linear-gradient(135deg, color-mix(in srgb, var(--service-action) 86%, #fff), var(--service-action-hover));
    box-shadow: 0 9px 20px var(--service-action-shadow), inset 0 1px 0 rgba(255,255,255,.24);
}
.product-ui-site :where(.secondary-btn, .materials-secondary-btn, .kor-btn-ghost, .kor-btn-reset, .kor-selected-btn.is-secondary, .kor-upload-secondary, .kor-purchase-cancel, .textbook-cart-btn, .textbook-share-btn, .tuition-payment-btn.muted, .settlement-request-btn, .cash-detail-btn) {
    border-radius: var(--control-radius);
    background: linear-gradient(180deg, #fff, #f9fbfd);
    box-shadow: 0 4px 12px rgba(15, 39, 68, .07), inset 0 1px 0 #fff;
}
.product-ui-site :where(button, [role="button"], a)[disabled],
.product-ui-site :where(button, [role="button"], a)[aria-disabled="true"] {
    border-color: #dbe3ed;
    background: linear-gradient(180deg, #f3f6fa, #e9eef5);
    color: #9aaabd;
    box-shadow: inset 0 1px 0 #fff;
}
.product-ui-site :is(.kor-filter-panel, .mypage-history-filter, .kor-selected-actions, .mypage-saved-actions, .mypage-legacy-side) {
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 39, 68, .075), inset 0 1px 0 rgba(255,255,255,.85);
}
.product-ui-site .mypage-legacy-side { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
    .product-ui-site :is(.kor-directory-link, .materials-item-card, .notice-list a, .qna-list a) { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
    .product-ui-site :is(.kor-directory-link, .materials-item-card, .notice-list a, .qna-list a):hover { transform: translateY(-2px); }
}

/* Mypage profile: mirror the admin member-detail information hierarchy. */
body.mypage-profile-section .mypage-page {
    padding-top: 0;
}

body.mypage-profile-section .mypage-legacy-shell.is-profile,
body.mypage-profile-section .mypage-legacy-main {
    width: min(960px, calc(100% - 32px)) !important;
    max-width: 960px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

body.mypage-profile-section .member-view-container {
    width: 100% !important;
    max-width: 960px !important;
    margin: 0 auto;
    padding: 38px 0 72px;
}

body.mypage-profile-section .member-view-heading {
    display: block;
    margin: 0 0 22px;
    text-align: left;
}

body.mypage-profile-section .member-view-heading .member-view-eyebrow {
    display: block;
    margin: 0 0 6px;
}

body.mypage-profile-section .member-view-heading .member-view-title {
    margin: 0;
    text-align: left;
    font-size: 34px;
}

body.mypage-profile-section .member-view-heading p {
    margin: 8px 0 0;
    text-align: left;
}

body.mypage-profile-section .profile-editor {
    display: block;
    padding: 22px;
    border: 1px solid #d8e3f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(18, 43, 76, .08);
}

body.mypage-profile-section .self-profile-summary {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 126px;
    padding: 22px 26px;
    border: 1px solid #d7e2ef;
    border-radius: 16px;
    background: #f8fafc;
}

body.mypage-profile-section .self-profile-avatar-wrap {
    position: relative;
    flex: 0 0 82px;
    width: 82px;
    height: 82px;
}

body.mypage-profile-section .self-profile-avatar-wrap :is(.member-avatar, .member-profile-image) {
    display: grid;
    box-sizing: border-box;
    width: 82px;
    height: 82px;
    min-width: 82px;
    min-height: 82px;
    max-width: 82px;
    max-height: 82px;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #687990;
    background: #e5ebf3;
    box-shadow: 0 8px 18px rgba(24, 47, 78, .14);
    object-fit: cover;
    object-position: center;
    object-position: center;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    font-size: 26px;
    font-weight: 850;
}

body.mypage-profile-section .self-profile-avatar-wrap .member-profile-image {
    display: block;
    object-fit: cover;
    object-position: 50% 50%;
}

body.mypage-profile-section .self-profile-avatar-wrap .profile-photo-actions {
    position: absolute;
    right: -4px;
    bottom: -2px;
    z-index: 2;
    display: flex;
    gap: 4px;
    order: initial;
}

body.mypage-profile-section .self-profile-avatar-wrap .profile-file-btn {
    display: grid;
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    max-width: 34px;
    max-height: 34px;
    flex: 0 0 34px;
    aspect-ratio: 1 / 1;
    place-items: center;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: #2869e6;
    box-shadow: 0 5px 12px rgba(40, 105, 230, .3);
    cursor: pointer;
}

body.mypage-profile-section .self-profile-avatar-wrap .profile-camera-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: currentColor;
    background: none;
    -webkit-mask: none;
    mask: none;
}

body.mypage-profile-section .self-profile-avatar-wrap .profile-file-text,
body.mypage-profile-section .self-profile-avatar-wrap .profile-remove-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

body.mypage-profile-section .self-profile-avatar-wrap .profile-remove-check {
    position: absolute;
    top: -58px;
    right: -4px;
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: #df4455;
}

body.mypage-profile-section .self-profile-avatar-wrap .profile-remove-check .profile-remove-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    opacity: 0;
}

body.mypage-profile-section .self-profile-avatar-wrap .profile-remove-check .profile-remove-icon {
    position: relative;
    z-index: 1;
    display: block;
    color: inherit;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

body.mypage-profile-section .self-profile-avatar-wrap .profile-remove-check:has(.profile-remove-input:focus-visible) {
    outline: 3px solid rgba(37, 99, 235, .32);
    outline-offset: 2px;
}

body.mypage-profile-section .self-profile-identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

body.mypage-profile-section .self-profile-identity > strong {
    color: #10213a;
    font-size: 22px;
    line-height: 1.2;
}

body.mypage-profile-section .self-profile-identity > span {
    color: #426084;
    font-size: 13px;
    font-weight: 750;
}

body.mypage-profile-section .self-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

body.mypage-profile-section .self-profile-badges em {
    padding: 4px 8px;
    border: 1px solid #d5e0ed;
    border-radius: 999px;
    color: #52667f;
    background: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
}

body.mypage-profile-section .self-profile-badges em.active {
    border-color: #b6ebcf;
    color: #087b43;
    background: #ecfbf3;
}

body.mypage-profile-section .self-profile-fields {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #d8e3f0;
    border-radius: 16px;
    background: #fff;
}

body.mypage-profile-section .self-profile-row {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
    border-bottom: 1px solid #e1e8f1;
}

body.mypage-profile-section .self-profile-row:last-child {
    border-bottom: 0;
}

body.mypage-profile-section .self-profile-row[hidden],
body.mypage-profile-section .profile-editor [hidden] {
    display: none !important;
}

body.mypage-profile-section .self-profile-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 18px;
    color: #315072;
    background: #f5f8fc;
    font-size: 13px;
    font-weight: 850;
}

body.mypage-profile-section .self-profile-row-content {
    min-width: 0;
    padding: 18px 20px;
}

body.mypage-profile-section .self-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

body.mypage-profile-section .self-profile-field {
    min-width: 0;
}

body.mypage-profile-section .self-profile-field .required-help {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #c62828;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

body.mypage-profile-section .self-profile-field .required-help[hidden] {
    display: none;
}

body.mypage-profile-section .self-profile-field.is-required-empty :is(input, select),
body.mypage-profile-section .self-profile-field :is(input, select).is-invalid,
body.mypage-profile-section .self-profile-field.is-required-empty .address-lookup input {
    border-color: #ef4444;
    background-color: #fff8f8;
}

body.mypage-profile-section .self-profile-field > label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: #4c607a;
    font-size: 12px;
    font-weight: 800;
}

body.mypage-profile-section .self-profile-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: #4c607a;
    font-size: 12px;
    font-weight: 800;
}

body.mypage-profile-section .profile-info-icon {
    display: inline-flex;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    align-items: center;
    justify-content: center;
    color: #3974b9;
}

body.mypage-profile-section .profile-info-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.mypage-profile-section .self-profile-row-title .profile-info-icon {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
    color: #2563a8;
}

body.mypage-profile-section .consent-check .profile-info-icon {
    margin-left: 2px;
}

body.mypage-profile-section .self-profile-static-value {
    display: flex;
    min-height: 46px;
    align-items: center;
    padding: 0 2px;
    color: #17243a;
    font-size: 15px;
    font-weight: 800;
}

body.mypage-profile-section .self-profile-field :is(input[type="text"], input[type="tel"], input[type="email"], select),
body.mypage-profile-section .self-profile-row .address-lookup input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #cbd8e8;
    border-radius: 10px;
    color: #17243a;
    background: #fff;
    font-size: 14px;
    font-weight: 650;
}

/* Keep select affordances after the shared input background reset above. */
body.mypage-profile-section .self-profile-field select[name] {
    appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234c607a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    cursor: pointer;
}

body.mypage-profile-section .self-profile-field select:required:invalid,
body.mypage-profile-section .self-profile-field select:disabled {
    color: #64748b;
    background-color: #f8fafc;
    font-weight: 400;
}

body.mypage-profile-section .self-profile-field select:disabled {
    cursor: not-allowed;
    opacity: 1;
}

body.mypage-profile-section .self-profile-field select option {
    color: #17243a;
    background-color: #fff;
}

body.mypage-profile-section .self-profile-field :is(input, select):focus,
body.mypage-profile-section .self-profile-row .address-lookup input:focus {
    border-color: #2b6ce5;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(43, 108, 229, .12);
}

body.mypage-profile-section .profile-account-type-note,
body.mypage-profile-section .self-profile-row-note {
    grid-column: 1 / -1;
    margin: -2px 0 0;
    color: #718198;
    font-size: 12px;
}

body.mypage-profile-section .mypage-phone-input-row,
body.mypage-profile-section .mypage-phone-code-row {
    grid-template-columns: minmax(0, 1fr) 128px;
}

body.mypage-profile-section .self-profile-row .address-lookup {
    display: grid;
    gap: 10px;
}

body.mypage-profile-section .self-profile-row .address-postcode-row {
    display: grid;
    grid-template-columns: 170px minmax(180px, 1fr);
    gap: 10px;
}

body.mypage-profile-section .self-profile-row .address-postcode-row button {
    min-height: 46px;
    border: 1px solid #bfd2ed;
    border-radius: 10px;
    color: #1d5dca;
    background: #edf4ff;
    font-weight: 800;
}

body.mypage-profile-section .self-profile-row .consent-value {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
}

body.mypage-profile-section .profile-editor .member-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    padding: 18px 0 2px;
    border-top: 1px solid #e1e8f1;
}

body.mypage-profile-section .profile-editor .member-save-btn {
    min-width: 180px;
    min-height: 48px;
}

body.mypage-profile-section :is(.member-save-btn, .member-password-btn):disabled,
body.mypage-profile-section :is(.member-save-btn, .member-password-btn)[aria-disabled="true"] {
    border-color: #d9e2ed !important;
    color: #9aa9bb !important;
    background: #e9eef5 !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 1;
}

body.mypage-profile-section :is(.member-save-btn, .member-password-btn):not(:disabled) {
    color: #fff;
    cursor: pointer;
}

@media (max-width: 820px) {
    body.mypage-profile-section .mypage-legacy-shell.is-profile,
    body.mypage-profile-section .mypage-legacy-main {
        width: calc(100% - 24px) !important;
        max-width: none !important;
    }

    body.mypage-profile-section .member-view-container {
        width: 100% !important;
        max-width: none !important;
        padding-top: 26px;
    }

    body.mypage-profile-section .member-view-heading .member-view-title {
        font-size: 28px;
    }

    body.mypage-profile-section .profile-editor {
        padding: 14px;
        border-radius: 16px;
    }

    body.mypage-profile-section .self-profile-summary {
        padding: 18px;
    }

    body.mypage-profile-section .self-profile-row {
        grid-template-columns: 1fr;
    }

    body.mypage-profile-section .self-profile-row-title {
        padding: 12px 16px;
        border-bottom: 1px solid #e1e8f1;
    }

    body.mypage-profile-section .self-profile-grid,
    body.mypage-profile-section .mypage-phone-input-row,
    body.mypage-profile-section .mypage-phone-code-row {
        grid-template-columns: 1fr;
    }

    body.mypage-profile-section .self-profile-row .address-postcode-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    body.mypage-profile-section .mypage-legacy-shell.is-profile,
    body.mypage-profile-section .mypage-legacy-main {
        width: calc(100% - 16px) !important;
    }

    body.mypage-profile-section .member-view-container {
        padding: 20px 0 48px;
    }

    body.mypage-profile-section .member-view-heading {
        margin-bottom: 16px;
    }

    body.mypage-profile-section .member-view-heading .member-view-title {
        font-size: 25px;
    }

    body.mypage-profile-section .member-view-heading p {
        font-size: 13px;
        line-height: 1.55;
    }

    body.mypage-profile-section .profile-editor {
        padding: 10px;
    }

    body.mypage-profile-section .self-profile-summary {
        align-items: flex-start;
        gap: 14px;
        min-height: 0;
        padding: 16px 14px;
    }

    body.mypage-profile-section .self-profile-avatar-wrap,
    body.mypage-profile-section .self-profile-avatar-wrap :is(.member-avatar, .member-profile-image) {
        width: 68px;
        height: 68px;
        flex-basis: 68px;
    }

    body.mypage-profile-section .self-profile-identity > strong {
        font-size: 19px;
    }

    body.mypage-profile-section .self-profile-badges {
        gap: 4px;
    }

    body.mypage-profile-section .self-profile-badges em {
        padding: 3px 6px;
        font-size: 10px;
    }

    body.mypage-profile-section .self-profile-row-content {
        padding: 15px 14px;
    }

    body.mypage-profile-section .self-profile-field,
    body.mypage-profile-section .mypage-phone-verification,
    body.mypage-profile-section .address-lookup {
        min-width: 0;
        max-width: 100%;
    }

    body.mypage-profile-section .self-profile-field :is(input, select),
    body.mypage-profile-section .self-profile-row .address-lookup input,
    body.mypage-profile-section .self-profile-row button {
        max-width: 100%;
    }

    body.mypage-profile-section .profile-editor .member-save-btn {
        width: 100%;
    }
}

/* Account dropdown logout action: render the form button as a complete menu row. */
.product-ui-site .account-dropdown-menu {
    min-width: 220px;
}

.product-ui-site .account-dropdown-logout-form {
    display: block;
    margin: 6px 0 0;
    padding: 6px 0 0;
    border-top: 1px solid #e7edf5;
}

.product-ui-site .account-dropdown-logout-form button {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    color: #d43f50;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.product-ui-site .account-dropdown-logout-form button:hover {
    background: #fff1f3;
    color: #b42335;
}

.product-ui-site .account-dropdown-logout-form button:focus-visible {
    outline: 2px solid #e96a78;
    outline-offset: 2px;
}

.product-ui-site .account-dropdown-logout-form .account-menu-logout {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}

/* Keep compact my-page searches complete at narrow widths. This deliberately
 * outranks the body-qualified rule in search-system.css. */
@media (max-width: 640px) {
    body.product-ui-site .mypage-search-row.ui-search.ui-search--compact {
        display: grid;
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        width: 100%;
        height: auto;
        min-height: 0;
        gap: 8px;
        overflow: visible;
    }

    body.product-ui-site .mypage-search-row.ui-search.ui-search--compact > * {
        width: 100%;
        min-width: 0;
        min-height: var(--ui-control-md);
    }

    body.product-ui-site .mypage-search-row.ui-search.ui-search--compact :is(input, .ui-search__input) {
        grid-column: auto !important;
    }
}
