:root {
    --mytree-bg: #ffeee1;
    --mytree-card: #f1e3d8;
    --mytree-card-strong: #eadbcc;
    --mytree-line: rgba(84, 63, 47, 0.22);
    --mytree-text: #111111;
    --mytree-muted: rgba(17, 17, 17, 0.72);
    --mytree-shadow: 0 22px 60px rgba(53, 35, 21, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.mytree-page {
    font-family: 'Inter', sans-serif;
    background: var(--mytree-bg);
    color: var(--mytree-text);
}

.mytree-shell {
    min-height: 100vh;
    padding: 18px;
    display: flex;
    justify-content: center;
}

.mytree-card {
    width: min(100%, 436px);
    background: rgba(255,255,255,0.12);
    border-radius: 26px;
    padding: 18px 20px 28px;
    position: relative;
}

.mytree-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.mytree-topbar-button {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(17,17,17,0.08);
    background: rgba(255,255,255,0.38);
    color: var(--mytree-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.mytree-topbar-button svg { width: 18px; height: 18px; }

.mytree-profile {
    text-align: center;
    padding: 4px 8px 10px;
}

.mytree-avatar {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    object-fit: cover;
    margin: 0 auto 14px;
    display: block;
}

.mytree-profile h1 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 700;
}

.mytree-profile p {
    margin: 0 auto 16px;
    max-width: 320px;
    font-size: 15px;
    line-height: 1.45;
}

.mytree-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.mytree-socials a {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.mytree-socials img,
.mytree-socials svg {
    width: 24px;
    height: 24px;
    display: block;
}

.mytree-featured-link {
    display: block;
    margin-top: 24px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--mytree-line);
    background: rgba(255,255,255,0.2);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--mytree-shadow);
}

.mytree-featured-preview {
    min-height: 220px;
    background: #d8cabf;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 18px;
}

.mytree-featured-preview span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.44);
    font-size: 12px;
    font-weight: 600;
}

.mytree-featured-footer {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    background: rgba(255,255,255,0.08);
}

.mytree-featured-footer strong { font-weight: 500; }
.mytree-featured-footer span { font-size: 20px; line-height: 1; opacity: 0.55; }

.mytree-links {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.mytree-link-item {
    min-height: 50px;
    display: grid;
    grid-template-columns: 44px 1fr 18px;
    align-items: center;
    gap: 12px;
    border-radius: 14px;
    border: 1px solid var(--mytree-line);
    background: rgba(255,255,255,0.16);
    padding: 10px 14px;
    color: inherit;
    text-decoration: none;
}

.mytree-link-left {
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mytree-link-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 8px;
    background: #d8cabf;
}

.mytree-link-thumb--empty {
    background: transparent;
}

.mytree-link-title {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.mytree-link-actions {
    justify-self: end;
    font-size: 19px;
    line-height: 1;
    opacity: 0.55;
}

.mytree-share-modal[hidden] { display: none; }
.mytree-share-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.mytree-share-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.46);
    backdrop-filter: blur(4px);
}

.mytree-share-dialog {
    position: relative;
    width: min(calc(100% - 32px), 540px);
    margin: 48px auto;
    background: #fff;
    border-radius: 24px;
    padding: 22px 22px 18px;
    color: #111;
}

.mytree-share-dialog h2 {
    margin: 0 0 18px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}

.mytree-share-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.mytree-share-card {
    max-width: 330px;
    margin: 0 auto 18px;
    padding: 24px 18px;
    border-radius: 24px;
    background: #4c331f;
    color: #fff;
    text-align: center;
}

.mytree-share-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 16px;
}

.mytree-share-card strong { display: block; font-size: 20px; margin-bottom: 6px; }
.mytree-share-card span { font-size: 14px; opacity: 0.9; }

.mytree-share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mytree-share-grid a,
.mytree-share-grid button {
    border: 0;
    background: transparent;
    text-decoration: none;
    color: #111;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.mytree-share-grid span {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #f0f0f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.mytree-share-grid small {
    font-size: 13px;
    font-weight: 500;
}

.mytree-share-feedback {
    margin: 16px 0 4px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .mytree-shell { padding: 16px; }
    .mytree-card { width: 100%; padding: 18px 18px 24px; }
    .mytree-featured-preview { min-height: 190px; }
    .mytree-share-dialog { margin: 26px auto; padding: 20px 16px 16px; }
}
