.pet-profile-page {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
}

.pet-profile-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(195, 160, 253, 0.35);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 12px 35px rgba(120, 90, 170, 0.12);
}

.pet-profile-image-wrap {
    background: linear-gradient(135deg, #f7eaff, #e9f5ff);
    border-radius: 22px;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-profile-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.pet-profile-info h1 {
    margin: 0;
    font-size: 34px;
    color: #5f3c83;
}

.pet-subtitle {
    margin: 6px 0 12px;
    color: #8a67ad;
    font-weight: 700;
}

.pet-owner {
    margin-bottom: 20px;
    color: #555;
}

.pet-owner a {
    color: #7b4dcc;
    font-weight: 700;
    text-decoration: none;
}

.pet-about-box {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(145, 202, 255, 0.4);
}

.pet-about-box h3 {
    margin-top: 0;
    color: #6b3f91;
}

.pet-owner-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pet-action-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d492fd, #91caff);
    color: white;
    font-weight: 700;
    text-decoration: none;
}

.pet-action-btn.secondary {
    background: #f2e9ff;
    color: #6b3f91;
}

@media (max-width: 750px) {
    .pet-profile-card {
        grid-template-columns: 1fr;
    }
}

.pet-profile-page {
    max-width: 980px;
    margin: 36px auto;
    padding: 20px;
}

.pet-hero-card,
.pet-section-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(195, 160, 253, 0.35);
    border-radius: 26px;
    box-shadow: 0 14px 34px rgba(120, 80, 180, 0.1);
}

.pet-hero-card {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    padding: 28px;
}

.pet-art-panel {
    min-height: 300px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f6e8ff, #eaf6ff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-main-image {
    max-width: 86%;
    max-height: 270px;
    object-fit: contain;
    filter: drop-shadow(0 12px 16px rgba(80, 50, 110, 0.18));
}

.pet-main-info h1 {
    margin: 0;
    font-size: 38px;
    color: #653a91;
}

.pet-main-info p {
    margin: 4px 0 0;
    color: #8562b4;
    font-weight: 700;
}

.pet-name-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.pet-small-btn,
.pet-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d492fd, #91caff);
    color: white;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.pet-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pet-detail-grid div {
    padding: 12px 14px;
    border: 1px solid rgba(145, 202, 255, 0.38);
    border-radius: 16px;
    background: #fff;
}

.pet-detail-grid span {
    display: block;
    margin-bottom: 4px;
    color: #8b84a0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.pet-detail-grid strong,
.pet-detail-grid a {
    color: #54316f;
    font-size: 15px;
    text-decoration: none;
}

.pet-lower-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.pet-section-card {
    padding: 22px;
}

.pet-section-card h3 {
    margin: 0 0 16px;
    color: #653a91;
    font-size: 20px;
}

.pet-stat {
    margin-bottom: 14px;
}

.pet-stat-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: #5c4b70;
    font-size: 13px;
    font-weight: 800;
}

.pet-bar {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #eee7f7;
}

.pet-bar div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #d492fd, #91caff);
}

.pet-story-text,
.pet-empty-text {
    color: #4f4f4f;
    line-height: 1.6;
}

.pet-empty-text {
    color: #999;
    font-style: italic;
}

.pet-character-art-card {
    grid-column: 1 / -1;
}

.pet-character-art-card img {
    max-width: 100%;
    border-radius: 18px;
    display: block;
}

@media (max-width: 800px) {
    .pet-hero-card,
    .pet-lower-grid {
        grid-template-columns: 1fr;
    }

    .pet-detail-grid {
        grid-template-columns: 1fr;
    }
}

.pet-section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.pet-mini-edit-btn {
    padding: 6px 12px;
    border-radius: 999px;
    background: #f4eaff;
    color: #6b3f91;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.pet-mini-edit-btn:hover {
    background: #ead7ff;
}

/* =========================
   EDIT PET PAGE
========================= */

.edit-pet-page {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
}

.edit-pet-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(195,160,253,0.35);
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 12px 28px rgba(120, 80, 180, 0.1);
}

.edit-pet-card h1 {
    margin-top: 0;
    color: #653a91;
}

.edit-pet-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.edit-pet-form label {
    font-weight: 700;
    color: #5f4a7a;
}

.edit-pet-form input,
.edit-pet-form textarea,
.edit-pet-form select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(195,160,253,0.4);
    font-size: 14px;
    box-sizing: border-box;
}

.edit-pet-form textarea {
    resize: vertical;
    min-height: 120px;
}

.pet-form-help {
    font-size: 12px;
    color: #888;
    margin-top: -6px;
}

.edit-pet-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* messages */
.pet-message {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 10px;
}

.pet-message.error {
    background: #ffeaea;
    color: #a33;
}

.pet-message.success {
    background: #eaffea;
    color: #2c7a2c;
}

.pet-art-page {
    max-width: 1000px;
    margin: 36px auto;
    padding: 20px;
}

.pet-art-header,
.pet-art-add-card,
.pet-art-card,
.pet-art-empty {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(195,160,253,0.35);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(120, 80, 180, 0.08);
}

.pet-art-header {
    padding: 24px;
    margin-bottom: 18px;
}

.pet-art-header h1 {
    margin: 0 0 8px;
    color: #653a91;
}

.pet-back-link {
    color: #6b3f91;
    font-weight: 700;
    text-decoration: none;
}

.pet-art-add-card {
    padding: 24px;
    margin-bottom: 22px;
}

.pet-art-add-card h2 {
    margin-top: 0;
    color: #653a91;
}

.pet-art-form {
    display: grid;
    gap: 12px;
}

.pet-art-form label {
    font-weight: 800;
    color: #5f4a7a;
}

.pet-art-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1px solid rgba(195,160,253,0.45);
    border-radius: 14px;
    font-size: 14px;
}

.pet-art-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.pet-art-card {
    overflow: hidden;
}

.pet-art-card img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    display: block;
    background: linear-gradient(135deg, #f8edff, #eef8ff);
}

.pet-art-meta {
    padding: 14px;
}

.pet-art-meta p {
    margin: 0 0 6px;
    color: #54316f;
    font-weight: 800;
}

.pet-art-meta a {
    color: #6b3f91;
    text-decoration: none;
}

.pet-art-meta span {
    display: block;
    color: #777;
    font-size: 13px;
    margin-bottom: 10px;
}

.pet-delete-art-btn {
    border: 0;
    border-radius: 999px;
    padding: 7px 12px;
    background: #ffe6ef;
    color: #a8325d;
    font-weight: 800;
    cursor: pointer;
}

.pet-art-empty {
    padding: 24px;
    color: #999;
    font-style: italic;
}

.pet-art-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.pet-art-preview-item {
    display: block;
    padding: 10px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8edff, #eef8ff);
}

.pet-art-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    display: block;
}

.pet-section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.pet-mini-edit-btn {
    padding: 7px 13px;
    border-radius: 999px;
    background: #f4eaff;
    color: #6b3f91;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.pet-mod-btn {
    margin-top: 12px;
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    background: #ffe6ef;
    color: #a8325d;
    font-weight: 900;
    cursor: pointer;
}

.pet-mod-btn:hover {
    background: #ffd4e4;
}