.home-profile-editor {
    box-sizing: border-box;
    background: linear-gradient(180deg, #f7f7f8, #e9e9ec);
    padding: 18px 15px 42px;
    color: #292929;
}

.hp-intro,
.hp-card {
    box-sizing: border-box;
    margin-bottom: 14px;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 18px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 8px 24px rgba(32,32,36,.055);
}

.hp-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px;
}

.hp-intro div {
    display: grid;
    gap: 5px;
}

.hp-intro b {
    font-size: 17px;
}

.hp-intro span,
.hp-note {
    color: #888;
    font-size: 11px;
    line-height: 1.5;
}

.hp-state {
    flex: none;
    padding: 5px 10px;
    border-radius: 999px;
    color: #565656 !important;
    background: #ebebed;
}

.hp-profile-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 10px;
    padding: 4px;
    border-radius: 14px;
    background: #dddde1;
}

.hp-profile-tabs button {
    min-height: 38px;
    border: 0;
    border-radius: 11px;
    color: #777;
    background: transparent;
    font-weight: 600;
}

.hp-profile-tabs button.active {
    color: #111;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

.hp-primary,
.hp-secondary,
.hp-danger,
.hp-button-grid button,
.hp-card > button {
    width: 100%;
    min-height: 43px;
    border: 0;
    border-radius: 12px;
    font-size: 13px;
}

.hp-primary {
    margin-bottom: 14px;
    color: white;
    background: #222;
}

.hp-primary:disabled {
    color: #888;
    background: #ddd;
}

.hp-card {
    overflow: hidden;
    padding: 15px;
}

.hp-card h3 {
    margin: 0 0 14px;
    font-size: 14px;
}

.hp-button-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hp-button-grid button,
.hp-secondary {
    padding: 9px;
    color: #444;
    background: #f0f0f2;
}

.hp-danger {
    color: #b74444;
    background: #fff0f0;
}

.hp-range-row {
    display: grid;
    gap: 8px;
    margin: 13px 0;
}

.hp-range-row > span {
    display: flex;
    justify-content: space-between;
    color: #555;
    font-size: 12px;
}

.hp-range-row output {
    color: #999;
}

.hp-range-row input {
    width: 100%;
    accent-color: #666;
}

.hp-field {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    color: #666;
    font-size: 12px;
}

.hp-field input,
.hp-field select,
.hp-card textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #dedee2;
    border-radius: 10px;
    outline: none;
    padding: 10px 11px;
    color: #333;
    background: #fafafa;
    font: inherit;
}

.hp-slot-group {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.hp-slot-group > b {
    color: #555;
    font-size: 12px;
}

.hp-slot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 9px;
}

.hp-color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 9px 0;
}

.hp-color-grid label {
    display: grid;
    gap: 5px;
    color: #777;
    font-size: 10px;
    text-align: center;
}

.hp-color-grid input[type="color"] {
    box-sizing: border-box;
    width: 100%;
    height: 37px;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 9px;
    background: white;
}

.hp-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.hp-image-tile {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 47px;
    padding: 8px 10px;
    border: 0;
    border-radius: 12px;
    color: #555;
    background: #f1f1f3;
    font-size: 11px;
    text-align: left;
}

.hp-image-tile i {
    font-size: 19px;
}

.hp-picker-head {
    display: grid;
    grid-template-columns: 70px 1fr 70px;
    align-items: center;
    margin-bottom: 15px;
}

.hp-picker-head button {
    border: 0;
    background: transparent;
    text-align: left;
}

.hp-picker-head b {
    text-align: center;
}

.hp-icon-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 8px;
}

.hp-icon-picker button {
    display: grid;
    place-items: center;
    gap: 4px;
    min-width: 0;
    padding: 9px 4px;
    border: 0;
    border-radius: 13px;
    color: #555;
    background: white;
}

.hp-icon-picker i {
    font-size: 26px;
}

.hp-icon-picker span {
    overflow: hidden;
    width: 100%;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-icon-picker small {
    color: #aaa;
    font-size: 8px;
}

.hp-layout-list,
.hp-layout-item {
    display: grid;
    gap: 9px;
}

.hp-layout-item {
    grid-template-columns: 1fr auto;
    padding: 12px;
    border-radius: 12px;
    background: #f4f4f5;
}

.hp-layout-item > div:first-child {
    display: grid;
    gap: 2px;
}

.hp-layout-item span {
    color: #aaa;
    font-size: 9px;
}

.hp-layout-actions {
    display: flex;
    gap: 4px;
}

.hp-layout-actions button {
    min-width: 31px;
    border: 0;
    border-radius: 7px;
    background: white;
    font-size: 11px;
}

.hp-layout-item label {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    font-size: 10px;
}

.hp-layout-item input {
    width: 100%;
    accent-color: #666;
}

.hp-icon-actions {
    margin-top: 12px;
}

.hp-text-danger {
    width: 100%;
    margin-top: 9px;
    padding: 8px;
    border: 0;
    color: #b74444;
    background: transparent;
    font-size: 11px;
}

.hp-live-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: -4px 0 14px;
    padding: 11px 12px;
    border-radius: 12px;
    color: #656568;
    background: rgba(255,255,255,.7);
    font-size: 11px;
    line-height: 1.5;
}

.hp-live-tip i {
    flex: none;
    margin-top: 1px;
    font-size: 16px;
}

.hp-batch-icon-card {
    padding: 13px;
}

.hp-batch-fill {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    margin: 12px 0;
}

.hp-batch-fill input,
.hp-batch-icon-list input {
    box-sizing: border-box;
    min-width: 0;
    border: 1px solid #dedee2;
    border-radius: 9px;
    outline: none;
    padding: 9px 10px;
    color: #333;
    background: #fafafa;
    font: inherit;
}

.hp-batch-fill button {
    border: 0;
    border-radius: 9px;
    padding: 0 12px;
    color: white;
    background: #555;
}

.hp-batch-icon-list {
    display: grid;
    gap: 8px;
}

.hp-batch-icon-list label {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.hp-batch-icon-list label > span {
    display: grid;
    gap: 2px;
    color: #444;
    font-size: 12px;
}

.hp-batch-icon-list small {
    color: #aaa;
    font-size: 8px;
}

.hp-batch-icon-list input {
    font-size: 11px;
}

.hp-batch-footer {
    position: sticky;
    bottom: -14px;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 8px;
    margin: 14px -13px -13px;
    padding: 11px 13px calc(11px + env(safe-area-inset-bottom));
    border-top: 1px solid #eee;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
}

.hp-batch-footer button {
    min-height: 42px;
    border: 0;
    border-radius: 11px;
    color: #444;
    background: #eeeef0;
}

.hp-batch-footer button:last-child {
    color: white;
    background: #222;
}

.beauty-guide-entry {
    position: relative;
    border: 1px solid rgba(64, 64, 70, .08);
    background: linear-gradient(135deg, #fff 0%, #f0f0f3 100%) !important;
}

.beauty-guide-new {
    flex: none;
    padding: 2px 6px;
    border-radius: 999px;
    color: #fff;
    background: #222;
    font-size: 9px;
}

.beauty-guide {
    box-sizing: border-box;
    padding: 18px 15px calc(36px + env(safe-area-inset-bottom));
    color: #29292c;
    background: linear-gradient(180deg, #f7f7f8, #e8e8eb);
}

.beauty-guide-hero,
.beauty-guide-card {
    box-sizing: border-box;
    margin-bottom: 13px;
    border: 1px solid rgba(0,0,0,.065);
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 8px 24px rgba(32,32,36,.045);
}

.beauty-guide-hero {
    overflow: hidden;
    padding: 22px 18px 17px;
    color: white;
    background:
        radial-gradient(circle at 85% 5%, rgba(255,255,255,.16), transparent 31%),
        linear-gradient(135deg, #202024, #696970);
}

.beauty-guide-kicker {
    font-size: 9px;
    letter-spacing: .16em;
    opacity: .68;
}

.beauty-guide-hero h2 {
    margin: 8px 0 7px;
    font-size: 21px;
}

.beauty-guide-hero p {
    margin: 0;
    font-size: 11px;
    line-height: 1.65;
    opacity: .82;
}

.beauty-guide-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 16px;
    padding: 9px 10px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 11px;
    background: rgba(255,255,255,.08);
    font-size: 9px;
}

.beauty-guide-route i {
    opacity: .45;
}

.beauty-guide-card {
    padding: 15px;
}

.beauty-guide-heading,
.beauty-guide-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.beauty-guide-heading span {
    padding: 3px 7px;
    border-radius: 999px;
    color: #fff;
    background: #555;
    font-size: 9px;
}

.beauty-guide-card summary {
    cursor: pointer;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
}

.beauty-guide-card summary::-webkit-details-marker {
    display: none;
}

.beauty-guide-card summary span {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 650;
}

.beauty-guide-card summary span i {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: #555;
    background: #ededf0;
    font-size: 12px;
}

.beauty-guide-card summary small {
    color: #aaa;
    font-size: 9px;
    font-weight: 400;
}

.beauty-guide-card summary::after {
    content: "+";
    flex: none;
    color: #888;
    font-size: 18px;
    font-weight: 300;
}

.beauty-guide-card[open] summary::after {
    content: "−";
}

.beauty-guide-card[open] summary {
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.beauty-guide-body {
    padding-top: 4px;
}

.beauty-guide-card p,
.beauty-guide-card li {
    color: #66666a;
    font-size: 11px;
    line-height: 1.72;
}

.beauty-guide-card p {
    margin: 9px 0 0;
}

.beauty-guide-card ol,
.beauty-guide-card ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.beauty-guide-card li + li {
    margin-top: 6px;
}

.beauty-guide-card h4 {
    margin: 14px 0 0;
    color: #363639;
    font-size: 12px;
}

.beauty-guide-card b {
    color: #343437;
}

.beauty-guide-tip {
    padding: 9px 10px;
    border-left: 3px solid #777;
    border-radius: 7px;
    background: #f1f1f3;
}

.beauty-guide-finish {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.beauty-guide-finish > i {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    background: #555;
    font-size: 12px;
}

.beauty-guide-finish p {
    margin-top: 3px;
}

body.theme-dark .home-profile-editor {
    color: var(--dk-text, #eee);
    background: var(--dk-bg, #171719);
}

body.theme-dark .hp-intro,
body.theme-dark .hp-card,
body.theme-dark .hp-icon-picker button {
    background: var(--dk-bg-elevated, #242427);
    border-color: var(--dk-border, #36363a);
}

body.theme-dark .beauty-guide {
    color: var(--dk-text, #eee);
    background: var(--dk-bg, #171719);
}

body.theme-dark .beauty-guide-card {
    background: var(--dk-bg-elevated, #242427);
    border-color: var(--dk-border, #36363a);
}

body.theme-dark .beauty-guide-card h4,
body.theme-dark .beauty-guide-card b {
    color: var(--dk-text, #eee);
}

body.theme-dark .beauty-guide-card p,
body.theme-dark .beauty-guide-card li {
    color: var(--dk-text-secondary, #b7b7bc);
}

body.theme-dark .beauty-guide-tip,
body.theme-dark .beauty-guide-card summary span i {
    background: var(--dk-bg-secondary, #303034);
}
