/* Member base styles */

.member-panel {
    padding: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: none;
}

.member-panel-large {
    grid-row: span 2;
}

.member-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.member-panel-head h2 {
    margin: 0;
    color: #2a211b;
    font-size: 20px;
    line-height: 1.25;
}

.member-panel-head span {
    max-width: 360px;
    color: #8a7a69;
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
}

.member-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.member-archive-shell {
    display: grid;
    gap: 10px;
    box-sizing: border-box;
    margin-right: auto;
    margin-left: auto;
    padding-top: var(--mobile-shell-top-gap);
    padding-right: 0;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 8px);
    padding-left: 0;
}

.member-archive-shell[hidden] {
    display: none;
}

.member-archive-empty {
    display: grid;
    gap: 6px;
    padding: 24px;
    color: #756554;
    background: #fffdfa;
    border: 1px dashed #dfcaa9;
    border-radius: 8px;
}

.member-archive-empty strong {
    color: #8d2d28;
    font-size: 18px;
}

.member-archive-empty span {
    line-height: 1.7;
}

.member-archive-panel[hidden] {
    display: none;
}

[data-archive-group][hidden] {
    display: none;
}

.member-archive-shell.is-open .member-archive-empty {
    display: none;
}

.member-profile-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.member-profile-form label {
    display: grid;
    gap: 6px;
    color: #4b3f35;
    font-size: 13px;
    font-weight: 800;
}

.member-profile-form input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d8c4a6;
    border-radius: 6px;
    padding: 0 12px;
    color: #2a211b;
    background: #fffdfa;
    font: inherit;
}

.member-profile-form input:focus {
    outline: none;
    border-color: #2f6f63;
    box-shadow: 0 0 0 3px rgba(47, 111, 99, 0.14);
}

.member-profile-form button {
    width: 140px;
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    color: #fff6e8;
    background: linear-gradient(135deg, #8d2d28, #b77d32);
    font-weight: 800;
    cursor: pointer;
}

.member-profile-form button:hover {
    filter: brightness(1.04);
}

.member-profile-form button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.member-settings-list {
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(48, 72, 64, 0.08);
    border-radius: 8px;
    background: #fff;
}

.member-settings-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 8px 14px;
    border: 0;
    border-bottom: 1px solid rgba(48, 72, 64, 0.08);
    color: #242424;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.member-settings-list > .member-settings-row:last-child {
    border-bottom: 0;
}

.member-settings-row::after {
    display: block;
    width: 7px;
    height: 7px;
    border-top: 1.5px solid rgba(36, 36, 36, 0.38);
    border-right: 1.5px solid rgba(36, 36, 36, 0.38);
    content: "";
    transform: rotate(45deg);
}

.member-settings-row:active {
    background: rgba(36, 36, 36, 0.035);
}

.member-settings-row span {
    min-width: 0;
    color: #242424;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}

.member-settings-logout {
    color: #a23a32;
}

.member-settings-logout span {
    color: #a23a32;
}

.member-result {
    display: none;
}

.member-toast {
    position: fixed;
    right: 50%;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 18px);
    z-index: 180;
    max-width: min(292px, calc(100% - 32px));
    padding: 10px 13px;
    border-radius: 8px;
    color: #fff;
    background: rgba(36, 36, 36, 0.9);
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translateX(50%) translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.member-toast.is-visible {
    opacity: 1;
    transform: translateX(50%) translateY(0);
}

.member-dialog-layer {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.member-dialog-layer.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.member-dialog {
    width: min(320px, 100%);
    padding: 18px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
    transform: translateY(8px);
    transition: transform 0.18s ease;
}

.member-dialog-layer.is-visible .member-dialog {
    transform: translateY(0);
}

.member-dialog h2 {
    margin: 0;
    color: #242424;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
}

.member-dialog p {
    margin: 10px 0 0;
    color: rgba(36, 36, 36, 0.68);
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

.member-dialog-content:not([hidden]) {
    margin-top: 12px;
}

.member-dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.member-dialog-actions button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    color: #242424;
    background: #f3f3f3;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
}

.member-dialog-actions button.primary {
    color: #fff;
    background: var(--color-accent, #8d2d28);
}

.member-dialog-actions button.danger {
    color: #fff;
    background: #c64b3f;
}

.member-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.member-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 10px 14px;
    text-align: center;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.member-links a:hover {
    border-color: #c89b4d;
    box-shadow: 0 16px 34px rgba(112, 74, 38, 0.12);
    transform: translateY(-2px);
}

.member-links strong {
    display: block;
    color: #8d2d28;
    font-size: 16px;
    line-height: 1.35;
}

.member-record-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.member-record-list {
    display: grid;
    gap: 8px;
}

.member-record-search {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-bottom: 10px;
    padding: 0 12px;
    border: 1px solid rgba(48, 72, 64, 0.1);
    border-radius: 8px;
    background: #fffdfa;
}

.member-record-manage {
    justify-self: end;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    color: #2a211b;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.member-record-manage.is-active {
    color: #9c2f2b;
}

.member-record-manage-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 42px;
    margin-bottom: 8px;
}

.member-record-manage-bar[hidden] {
    display: none;
}

.member-record-manage-bar button {
    min-width: 68px;
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    color: #242424;
    background: #f4f4f4;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
}

.member-record-manage-bar button.danger {
    color: #fff;
    background: #9c2f2b;
}

.member-record-manage-bar button:disabled,
.member-record-manage-bar button.is-disabled {
    opacity: 0.45;
}

.member-record-search svg {
    width: 19px;
    height: 19px;
    stroke: #7a6254;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.member-record-search input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border: 0;
    outline: 0;
    color: #2a211b;
    background: transparent;
    font: inherit;
    font-size: 15px;
}

.member-record-search input::placeholder {
    color: rgba(122, 98, 84, 0.72);
}

.member-record {
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    background: rgba(255, 253, 248, 0.72);
    border: 1px solid #ead7b8;
    border-radius: 8px;
    box-shadow: none;
}

.member-record:not(.member-address-card) > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.member-record strong {
    color: #8d2d28;
    font-size: 15px;
}

.member-record span {
    color: #8a7a69;
    font-size: 13px;
    white-space: nowrap;
}

.member-record p {
    margin: 0;
    color: #5e4d3e;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.member-tool-record-card {
    position: relative;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-color: rgba(48, 72, 64, 0.08);
}

.member-record-check {
    display: none;
    position: absolute;
    top: 13px;
    left: 12px;
    width: 22px;
    height: 22px;
}

.member-record-check input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.member-record-check span {
    display: block;
    width: 22px;
    height: 22px;
    border: 1.5px solid rgba(36, 36, 36, 0.28);
    border-radius: 50%;
    background: #fff;
}

.member-record-check input:checked + span {
    border-color: #f06a22;
    background: #f06a22;
}

.member-record-check input:checked + span::after {
    display: block;
    width: 8px;
    height: 4px;
    margin: 6px auto 0;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    content: "";
    transform: rotate(-45deg);
}

#memberRecordsPanel.is-record-managing .member-tool-record-card {
    padding-left: 44px;
}

#memberRecordsPanel.is-record-managing .member-record-check {
    display: block;
}

#memberRecordsPanel.is-record-managing .member-tool-record-card .member-record-actions {
    display: none;
}

.member-tool-record-card.is-selected {
    border-color: rgba(240, 106, 34, 0.34);
    background: #fffaf6;
}

.member-tool-record-card .member-tool-record-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
}

.member-tool-record-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.member-tool-record-card .member-tool-record-title strong {
    overflow: hidden;
    color: #242424;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-tool-record-card .member-tool-record-title em {
    overflow: hidden;
    color: rgba(36, 36, 36, 0.56);
    font-size: 12px;
    font-style: normal;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-tool-record-card .member-tool-record-main > span {
    color: rgba(36, 36, 36, 0.48);
    font-size: 12px;
    line-height: 1.5;
}

.member-tool-record-card .member-tool-record-summary {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(36, 36, 36, 0.72);
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.member-tool-record-card .member-record-actions {
    justify-content: flex-start;
    margin-top: 0;
}

.member-tool-record-card .member-record-actions button {
    min-width: 72px;
    min-height: 34px;
    border-color: rgba(48, 72, 64, 0.12);
    border-radius: 7px;
    color: #242424;
    background: #f7f7f7;
    font-size: 13px;
    font-weight: 500;
}

.member-tool-record-card .member-record-actions .danger {
    color: #9c2f2b;
    background: #fff7f6;
    border-color: rgba(156, 47, 43, 0.16);
}

.member-favorite {
    grid-template-columns: 66px minmax(0, 1fr);
    align-items: start;
    gap: 10px 11px;
    padding: 11px 12px;
    border-color: rgba(36, 36, 36, 0.06);
    background: #fff;
}

.member-favorite-cover {
    width: 66px;
    height: 66px;
    overflow: hidden;
    border-radius: 8px;
    background: #f6f6f6;
}

.member-favorite-cover-link {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: block;
    width: 66px;
    height: 66px;
    border-radius: 8px;
    text-decoration: none;
}

.member-favorite-cover span {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #f06a22;
    font-size: 24px;
    font-weight: 800;
    background: #f6f6f6;
}

.member-favorite-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.member-favorite-body {
    display: grid !important;
    gap: 5px;
    min-width: 0;
}

.member-favorite-title-line {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.member-favorite-title-line strong {
    overflow: hidden;
    color: #242424;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-favorite-title-line em {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    color: #777;
    background: #f4f4f4;
    font-size: 11px;
    font-style: normal;
    line-height: 1.2;
}

.member-favorite .member-favorite-body p {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(36, 36, 36, 0.58);
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.member-favorite-meta {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.member-favorite-meta strong {
    color: #f06a22;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.member-favorite-meta strong.is-muted {
    color: rgba(36, 36, 36, 0.52);
    font-size: 12px;
    font-weight: 500;
}

.member-favorite-meta span {
    overflow: hidden;
    color: rgba(36, 36, 36, 0.42);
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-favorite .member-record-actions {
    grid-column: 2;
    justify-content: flex-end;
    margin-top: 0;
}

.member-favorite .member-record-actions button {
    min-width: 72px;
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    color: #9c2f2b;
    background: #fff2f0;
    font-size: 13px;
    font-weight: 500;
}

.member-order-card {
    gap: 8px;
    padding: 12px;
    background: rgba(255, 253, 248, 0.72);
    box-shadow: none;
}

.member-order-head,
.member-order-meta,
.member-order-foot,
.member-order-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.member-order-head strong {
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
}

.member-order-head span:first-child {
    min-width: 0;
    overflow: hidden;
    color: #8a7a69;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-order-title {
    display: -webkit-box;
    overflow: hidden;
    color: #3b2a20;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.member-order-status {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #8d2d28;
    background: #fff2df;
    border: 1px solid #ead0a8;
}

.member-order-status.is-paid,
.member-order-status.is-shipped {
    color: #1e6b48;
    background: #eef8f1;
    border-color: #bdddc8;
}

.member-order-status.is-done {
    color: #6a4a13;
    background: #fff7da;
    border-color: #ead58b;
}

.member-order-status.is-cancelled {
    color: #777;
    background: #f4f1ec;
    border-color: #ddd6ca;
}

.member-order-meta,
.member-order-foot {
    color: #806f5f;
    font-size: 12px;
    line-height: 1.35;
}

.member-order-meta span,
.member-order-foot span {
    min-width: 0;
    white-space: normal;
}

.member-order-foot em {
    flex: 0 0 auto;
    color: #8a7a69;
    font-style: normal;
    white-space: nowrap;
}

.member-order-foot strong {
    flex: 0 0 auto;
    color: #8d2d28;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}

.member-order-state {
    min-height: 30px;
    padding: 6px 8px;
    border-radius: 8px;
    color: #806f5f;
    background: rgba(141, 45, 40, 0.045);
    font-size: 12px;
    line-height: 1.35;
}

.member-order-state span {
    overflow: hidden;
    color: #6f211d;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-order-actions {
    margin-top: 0;
}

.member-record-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

.member-record-actions button,
.member-record-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    min-height: 40px;
    border: 1px solid #d8c4a6;
    border-radius: 999px;
    padding: 0 12px;
    color: #8d2d28;
    background: #fff6e8;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.member-record-actions button:hover,
.member-record-actions a:hover {
    border-color: #c89b4d;
    background: #fff1d8;
}

.member-record-actions .danger {
    color: #9c2f2b;
    background: #fffafa;
    border-color: #e5b9b2;
}

.member-order-actions .order-pay-button {
    border-color: transparent;
    color: #fff;
    background: #f06a22;
}

.member-order-status.is-refund {
    color: #8d2d28;
    background: #fff0f0;
    border-color: #e7b8b0;
}

.member-address-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 72px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #242424;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.member-address-form {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(36, 36, 36, 0.08);
    border-radius: 8px;
    box-shadow: none;
}

.member-address-form[hidden] {
    display: none;
}

.member-address-form label,
.member-address-default,
.member-address-region-field {
    display: grid;
    gap: 6px;
    color: rgba(36, 36, 36, 0.68);
    font-size: 13px;
    line-height: 1.35;
}

.member-address-form input,
.member-address-form select,
.member-address-form textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(36, 36, 36, 0.1);
    border-radius: 8px;
    padding: 11px 12px;
    color: #242424;
    background: #f8f8f8;
    font: inherit;
    font-size: 16px;
    line-height: 1.5;
}

.member-address-region-field {
    grid-column: 1 / -1;
}

.member-address-region-selects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    min-height: 44px;
    border-radius: 8px;
    background: #f8f8f8;
}

.member-address-region-selects select {
    min-height: 44px;
    border: 0;
    border-right: 1px solid rgba(36, 36, 36, 0.08);
    border-radius: 0;
    background-color: transparent;
}

.member-address-region-selects select:last-child {
    border-right: 0;
}

@media (max-width: 390px) {
    .member-order-foot {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    .member-record-actions button,
    .member-record-actions a {
        min-width: 78px;
        padding: 0 10px;
        font-size: 13px;
    }
}

.member-address-form select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 11px) 50%;
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
    padding-right: 34px;
}

.member-address-form select:disabled {
    color: rgba(36, 36, 36, 0.36);
    background-color: #f2f2f2;
}

.member-address-form textarea {
    min-height: 92px;
    resize: vertical;
}

.member-address-form input:focus,
.member-address-form select:focus,
.member-address-form textarea:focus {
    outline: none;
    border-color: #f06a22;
    box-shadow: 0 0 0 3px rgba(240, 106, 34, 0.12);
}

.member-address-detail-field {
    display: grid;
}

.member-address-default {
    grid-template-columns: auto 1fr;
    align-items: center;
    min-height: 44px;
}

.member-address-default input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: #f06a22;
}

.member-address-form-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.member-address-form-actions button {
    min-width: 108px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0 14px;
    color: #fff;
    background: #f06a22;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.member-address-cancel {
    color: rgba(36, 36, 36, 0.72);
    background: #ededed;
}

.member-address-list {
    display: grid;
    gap: 8px;
}

.member-address-list[hidden] {
    display: none;
}

.member-address-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 12px 14px 14px;
    border: 0;
    background: #fff;
    box-shadow: none;
}

.member-address-card.is-default {
    box-shadow: none;
}

.member-address-card > .member-address-content {
    display: grid;
    justify-content: stretch;
    align-content: start;
    align-items: start;
    min-width: 0;
    gap: 8px;
}

.member-address-region {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.member-address-region strong {
    color: rgba(36, 36, 36, 0.42);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.member-address-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 9px;
    color: rgba(36, 36, 36, 0.76);
    font-size: 14px;
    line-height: 1.4;
}

.member-address-tag {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 5px;
    border: 0;
    border-radius: 4px;
    color: #f06a22;
    background: rgba(240, 106, 34, 0.1);
    font-size: 11px;
    font-weight: 600;
}

.member-address-detail-text {
    margin: 0;
    color: #242424;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.member-address-card > .member-address-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 0;
}

.member-address-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0;
    color: rgba(36, 36, 36, 0.42);
    background: #f3f3f3;
    font: inherit;
    cursor: pointer;
}

.member-record-actions.member-address-actions button:hover {
    border-color: transparent;
    background: #ececec;
}

.member-address-actions svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.member-address-sub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.member-address-sub-actions button {
    min-width: 0;
    min-height: 28px;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: rgba(36, 36, 36, 0.42);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
}

.member-address-sub-actions button.danger {
    color: rgba(198, 75, 63, 0.76);
    border-color: transparent;
    background: transparent;
}

.member-record-actions.member-address-sub-actions button:hover {
    border-color: transparent;
    background: transparent;
}

@media (max-width: 420px) {
    .member-address-card {
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: center;
    }

    .member-address-actions {
        justify-content: center;
    }
}

.member-modal[hidden] {
    display: none;
}

.member-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
}

.member-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(42, 33, 27, 0.58);
}

.member-modal-card {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(720px, calc(100svh - 40px));
    overflow: auto;
    padding: 26px;
    background: #fffdfa;
    border: 1px solid #e3d2b7;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(30, 12, 8, 0.28);
}

.member-modal-card h2 {
    margin: 0 40px 14px 0;
    color: #242424;
    font-size: 18px;
    font-weight: 500;
}

.member-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 1px solid #d8c4a6;
    border-radius: 50%;
    color: #8d2d28;
    background: #fff6e8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.member-record-detail {
    display: grid;
    gap: 10px;
}

.member-detail-meta {
    display: grid;
    gap: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(36, 36, 36, 0.08);
    border-radius: 8px;
}

.member-detail-meta div {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 11px 12px;
}

.member-detail-meta div + div {
    border-top: 1px solid rgba(36, 36, 36, 0.06);
}

.member-detail-meta span {
    color: rgba(36, 36, 36, 0.52);
    font-size: 13px;
    line-height: 1.45;
}

.member-detail-meta strong {
    min-width: 0;
    color: #242424;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    word-break: break-word;
}

.member-detail-section h3 {
    margin: 0;
    color: #242424;
    font-size: 15px;
    font-weight: 500;
}

.member-detail-list {
    display: grid;
    gap: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid rgba(36, 36, 36, 0.08);
    border-radius: 8px;
    list-style: none;
}

.member-detail-list li {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 12px;
    color: rgba(36, 36, 36, 0.58);
}

.member-detail-list li + li {
    border-top: 1px solid rgba(36, 36, 36, 0.06);
}

.member-detail-list strong {
    color: #242424;
    font-weight: 500;
    text-align: left;
    word-break: break-word;
}

.member-detail-section {
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(36, 36, 36, 0.08);
    border-radius: 8px;
}

.member-detail-section ul {
    margin: 8px 0 0;
    padding-left: 17px;
    line-height: 1.6;
    color: rgba(36, 36, 36, 0.72);
}

.member-detail-raw {
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(36, 36, 36, 0.08);
    border-radius: 8px;
}

.member-detail-raw summary {
    color: #242424;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.member-detail-raw pre {
    max-height: 220px;
    margin: 12px 0 0;
    overflow: auto;
    padding: 12px;
    color: rgba(36, 36, 36, 0.76);
    background: #f7f7f7;
    border: 0;
    border-radius: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

.member-record-detail h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.member-record-detail pre {
    max-height: 260px;
    margin: 0;
    overflow: auto;
    padding: 14px;
    color: #3f332a;
    background: #fffdfa;
    border: 1px solid #e4d4b9;
    border-radius: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

body.modal-open {
    overflow: hidden;
}

html.member-mobile-root,
body.member-mobile-body {
    height: 100%;
    overscroll-behavior: none;
}

html.member-mobile-root,
.member-mobile-body {
    overscroll-behavior-y: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.member-mobile-body {
    min-height: 100%;
    overflow-x: hidden;
}

.member-mobile-body::-webkit-scrollbar,
html.member-mobile-root::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.member-mobile-body .site-bottom-spacer {
    display: none;
}

/* Member mobile center */
.member-mobile-page {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.member-mobile-shell {
    display: grid;
    gap: 6px;
    box-sizing: border-box;
    margin-right: auto;
    margin-left: auto;
    padding-top: var(--mobile-shell-top-gap);
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
    align-content: start;
}

.member-mobile-shell.is-hidden {
    display: none;
}

.member-mobile-page:not(.is-archive-active) {
    overflow-x: hidden;
}

.member-mobile-page.is-archive-active {
    overflow-x: hidden;
}

.member-mobile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 62px;
    padding: 2px 0 4px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.member-mobile-profile {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.member-mobile-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(31, 23, 18, 0.12);
    border-radius: 50%;
    color: #1f1f1f;
    background: transparent;
    box-shadow: none;
    font-size: 0;
}

.member-mobile-avatar svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.member-mobile-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.member-mobile-avatar.has-image {
    overflow: hidden;
    border-color: rgba(31, 23, 18, 0.08);
}

.member-mobile-avatar.has-image svg {
    display: none;
}

.member-mobile-profile-text {
    min-width: 0;
}

.member-mobile-profile-text h1 {
    margin: 0;
    overflow: hidden;
    color: #2a211b;
    font-size: 20px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-mobile-profile-text p {
    display: none;
}

.member-mobile-profile-text span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-top: 5px;
    padding: 0 8px;
    border: 1px solid rgba(42, 33, 27, 0.78);
    border-radius: 999px;
    color: #2a211b;
    background: transparent;
    font-size: 12px;
    font-weight: 800;
}

.member-mobile-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
}

.member-mobile-action,
.member-order-item,
.member-shortcut-item {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.member-mobile-action {
    display: grid;
    gap: 2px;
    place-items: center;
    width: 48px;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    color: #1f1f1f;
    background: transparent;
    box-shadow: none;
}

.member-mobile-action span {
    display: block;
    color: #777;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 500;
}

.member-mobile-action:active,
.member-order-item:active,
.member-shortcut-item:active {
    transform: translateY(1px);
    background: transparent;
}

.member-vip-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 12px 16px;
    border: 1px solid rgba(247, 223, 173, 0.22);
    border-radius: 8px;
    color: #f7dfad;
    background: linear-gradient(135deg, #24190f, #5c421f 60%, #99723a);
    box-shadow: none;
}

.member-vip-banner::after {
    position: absolute;
    right: 76px;
    top: 4px;
    color: rgba(255, 238, 200, 0.1);
    content: "VIP";
    font-family: Georgia, "Times New Roman", serif;
    font-size: 58px;
    font-style: italic;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.member-vip-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    min-width: 0;
}

.member-vip-copy strong {
    overflow: hidden;
    font-size: 18px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-vip-copy p {
    margin: 0;
    color: rgba(255, 246, 232, 0.86);
    font-size: 12px;
    line-height: 1.35;
}

.member-vip-action {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    color: #5a3d12;
    background: #fff1c7;
    font-size: 14px;
    font-weight: 900;
}

.member-stat-grid,
.member-order-grid,
.member-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.member-stat-grid,
.member-mobile-card {
    border: 1px solid rgba(48, 72, 64, 0.09);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.member-stat-card {
    display: grid;
    justify-items: center;
    gap: 7px;
    border: 0;
    min-width: 0;
    min-height: 66px;
    padding: 13px 4px 12px;
    text-align: center;
    background: transparent;
    font: inherit;
    cursor: default;
}

.member-stat-card + .member-stat-card {
    border-left: 1px solid rgba(48, 72, 64, 0.07);
}

button.member-stat-card {
    cursor: pointer;
}

button.member-stat-card:active {
    background: rgba(141, 45, 40, 0.06);
}

.member-stat-card strong {
    overflow: hidden;
    max-width: 100%;
    color: #8d2d28;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-stat-card span {
    overflow: hidden;
    max-width: 100%;
    color: #7d6a55;
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-mobile-card {
    overflow: hidden;
}

.member-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 0 12px;
    border-bottom: 1px solid rgba(48, 72, 64, 0.08);
}

.member-card-head h2 {
    margin: 0;
    color: #1f2b28;
    font-size: 16px;
    line-height: 1.25;
}

.member-card-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 44px;
    color: rgba(95, 86, 76, 0.58);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.member-card-head a::after {
    display: block;
    width: 7px;
    height: 7px;
    margin-left: 2px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    content: "";
    transform: rotate(45deg);
}

.member-order-grid {
    min-height: 68px;
    padding: 8px 0 10px;
}

.member-order-item,
.member-shortcut-item {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 62px;
    padding: 6px 4px;
    color: #5e4d3e;
    background: transparent;
    text-align: center;
}

.member-shortcut-grid {
    position: relative;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 10px 0 12px;
    gap: 0;
}

.member-shortcut-grid::before {
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
    height: 1px;
    background: rgba(48, 72, 64, 0.08);
    content: "";
    pointer-events: none;
}

.member-shortcut-item {
    min-height: 66px;
}

.member-shortcut-item:nth-child(n + 5) {
    border-top: 0;
}

.member-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.member-mobile-action .member-icon {
    width: 24px;
    height: 24px;
    stroke-width: 1.9;
}

.member-order-icon-wrap {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 34px;
    color: #1f1f1f;
}

.member-order-item .member-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    color: currentColor;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    stroke-width: 1.8;
}

.member-order-badge {
    position: absolute;
    top: -3px;
    right: -4px;
    box-sizing: border-box;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    color: #fff;
    background: #d93025;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
}

.member-order-badge[hidden] {
    display: none;
}

.member-shortcut-item .member-icon {
    color: #1f1f1f;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.member-order-label,
.member-shortcut-item span {
    overflow: hidden;
    max-width: 100%;
    color: #777;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-archive-shell.is-active {
    padding-top: 0;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 8px);
}

.member-archive-shell .member-panel {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.member-archive-shell .member-panel-head {
    min-height: 44px;
    margin-bottom: 0;
}

.member-archive-shell .member-panel-head h2 {
    font-size: 22px;
    font-weight: 600;
}

.member-archive-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 0;
    background: var(--app-bg);
}

#memberRecordsPanel .member-archive-head {
    position: sticky;
    top: 0;
    z-index: 14;
}

.member-archive-head h2 {
    min-width: 0;
    text-align: center;
}

.member-archive-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0;
    color: #2a211b;
    background: transparent;
    cursor: pointer;
}

.member-archive-head > span {
    justify-self: end;
    color: #8b8178;
    font-size: 12px;
    white-space: nowrap;
}

.member-archive-head .member-address-add {
    justify-self: end;
    min-width: 44px;
    padding: 0;
    border: 0;
    color: #2a211b;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
}

#memberRecordsPanel .member-record-search {
    position: sticky;
    top: 44px;
    z-index: 13;
    margin-bottom: 8px;
    background: var(--app-bg);
}

#memberRecordsPanel .member-record-manage-bar {
    position: sticky;
    top: 94px;
    z-index: 12;
    background: var(--app-bg);
}

.member-archive-back svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.member-archive-shell .member-record-list {
    gap: 8px;
}

.member-archive-shell .member-profile-form,
.member-archive-shell .member-address-form {
    grid-template-columns: 1fr;
}

.member-archive-shell.is-address-active .member-record-grid {
    grid-template-columns: minmax(0, 1fr);
}

.member-archive-shell.is-address-active #memberAddressesPanel {
    width: 100%;
}

.member-mobile-spacer {
    display: none;
    height: 0;
}

@media (min-width: 720px) {
    .member-mobile-page {
        padding-top: 0;
    }
}

@media (max-width: 380px) {
    .member-mobile-profile {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
    }

    .member-mobile-avatar {
        width: 48px;
        height: 48px;
    }

    .member-mobile-profile-text h1 {
        font-size: 18px;
    }

    .member-vip-banner {
        padding: 14px;
    }

    .member-vip-copy strong {
        font-size: 19px;
    }

    .member-vip-action {
        min-width: 84px;
        padding: 0 12px;
    }

    .member-order-item span,
    .member-shortcut-item span,
    .member-stat-card span {
        font-size: 12px;
    }
}

@media (min-width: 921px) {
    .member-mobile-page {
        padding: 0;
    }

    .member-mobile-shell {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 16px;
        padding-top: var(--mobile-shell-top-gap);
    }

    .member-mobile-hero,
    .member-vip-banner,
    .member-stat-grid,
    .member-mobile-spacer {
        grid-column: 1 / -1;
    }

    .member-mobile-card {
        grid-column: 1 / -1;
    }

    .member-shortcut-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .member-shortcut-grid::before {
        display: none;
    }

    .member-shortcut-item:nth-child(n + 5) {
        border-top: 0;
    }

    .member-shortcut-item:nth-child(n + 7) {
        border-top: 1px solid rgba(48, 72, 64, 0.08);
    }

    .member-order-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .member-order-item,
    .member-shortcut-item {
        min-height: 72px;
    }

    .member-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .member-record-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    }

    .member-archive-shell .member-form-grid,
    .member-archive-shell .member-record-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-archive-shell .member-archive-panel {
        width: 100%;
        min-width: 0;
    }

    .member-archive-shell.is-address-active .member-record-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-archive-shell.is-address-active .member-address-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .member-archive-shell.is-address-active .member-address-region-field {
        grid-column: 1 / -1;
    }

    .member-archive-shell.is-address-active .member-address-form > label,
    .member-archive-shell.is-address-active .member-address-default,
    .member-archive-shell.is-address-active .member-address-form-actions,
    .member-archive-shell.is-address-active .member-result {
        grid-column: 1 / -1;
    }

}



.member-page {
    min-width: 0;
}

.member-name,
.member-logout,
.mobile-member-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
}

.member-name {
    color: var(--color-accent);
}

.member-logout,
.mobile-member-logout {
    border: 1px solid rgba(141, 45, 40, 0.18);
    color: #6f6257;
    background: rgba(255, 253, 248, 0.72);
}

.member-archive-back svg,
.member-panel-head svg {
    width: 22px;
    height: 22px;
}
