.penpal-container {
    width: 100%;
    max-width: 1100px;
    margin: 25px auto;
    background: #fff;
    border: 1px solid #d8d8d8;
    overflow: hidden;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

.penpal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 24px 30px;
    background: #7dadee;
    color: #fff;
}

.penpal-header-logo {
    flex-shrink: 0;
}

.penpal-header-logo img {
    width: 72px;
    height: 72px;
    display: block;
}

.penpal-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.penpal-header-subtitle {
    font-size: 15px;
    line-height: 1;
    margin-bottom: 6px;
}

.penpal-header-title {
    font-size: 40px;
    line-height: 1;
    font-weight: 700;
    margin: 0;
}

.penpal-body {
    padding: 20px 20px 0;
    background: #f5f5f5;
}

.penpal-top {
    display: flex;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 20px;
}

.penpal-photo {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #d8d8d8;
    padding: 10px;
    box-sizing: border-box;
}

.penpal-photo img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #ececec;
}

.penpal-photo-counter {
    text-align: center;
    margin-top: 8px;
    color: #666;
    font-size: 13px;
    user-select: none;
}

.penpal-profile {
    flex: 1;
    background: #fff;
    border: 1px solid #d8d8d8;
    display: flex;
    flex-direction: column;
}

.penpal-box-title {
    background: #7dadee;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 14px 18px;
}

.penpal-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.penpal-label {
    font-size: 13px;
    font-weight: bold;
    color: #444;
    margin-bottom: 6px;
}

.penpal-input,
.penpal-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfcfcf;
    background: #fff;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 2px;
}

.penpal-input {
    height: 32px;
}

.penpal-textarea {
    flex: 1;
    resize: none;
}

.penpal-bottom {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.penpal-about {
    width: 68%;
    background: #fff;
    border: 1px solid #d8d8d8;
}

.penpal-incarceration {
    width: 32%;
    background: #fff;
    border: 1px solid #d8d8d8;
}

.penpal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.penpal-table td {
    border: 1px solid #ececec;
    padding: 8px 10px;
    vertical-align: middle;
}

.penpal-table tr:nth-child(even) {
    background: #f8f8f8;
}

.penpal-table td:first-child,
.penpal-table td:nth-child(3) {
    width: 26%;
    font-weight: bold;
}

.penpal-table td:nth-child(2),
.penpal-table td:nth-child(4) {
    width: 24%;
}

.penpal-table .penpal-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 28px;
    margin: 0;
    padding: 4px 6px;
    border: 1px solid #d5d5d5;
    box-sizing: border-box;
    font-size: 12px;
}

.penpal-actions {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-top: 20px;
    padding: 18px 20px;

    border-top: 1px solid #d8d8d8;
    background: #f5f5f5;
}

.penpal-btn {
    min-width: 280px;
    height: 44px;
    border: none;
    border-radius: 3px;
    background: #7dadee;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: .2s;
}

.penpal-btn:hover {
    background: #6aa3ea;
}

.penpal-photo img {
    cursor: pointer;
}

.penpal-photo {
    position: relative;
}

.penpal-photo-overlay {
    position: absolute;
    inset: 10px 10px auto 10px;
    aspect-ratio: 1 / 1;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    pointer-events: none;
}

.penpal-upload-title {
    margin-top: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #666;
}

.penpal-upload-text {
    margin-top: 6px;
    font-size: 14px;
    color: #888;
}

.penpal-photo img:not([src*="placehold"]) + .penpal-photo-overlay {
    display: none;
}

/* ===========================
   PENPAL CARD
=========================== */

.penpal-card {
    width: 100%;
    max-width: 1100px;
    margin: 25px auto;
    background: #fff;
    border: 1px solid #d8d8d8;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

.penpal-card-header img {
    display: block;
    width: 100%;
}

.penpal-card-main {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f5f5f5;
    align-items: stretch;
}

.penpal-card-photo {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #d8d8d8;
    padding: 10px;
}

.penpal-card-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Правая часть (Знакомьтесь + описание) */

.penpal-card-description-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid #d8d8d8;
}

.penpal-card-title {
    background: #7dadee;
    color: #fff;
    padding: 14px 18px;
    font-size: 18px;
    font-weight: bold;
}

.penpal-card-description {
    flex: 1;
    padding: 18px;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    white-space: normal;
    word-break: break-word;
}

.penpal-card-content {
    display: flex;
    gap: 20px;
    padding: 0 20px 20px;
    background: #f5f5f5;
}

.penpal-card-section {
    flex: 1;
    background: #fff;
    border: 1px solid #d8d8d8;
}

.penpal-card-content .penpal-card-title {
    background: #7dadee;
    color: #fff;
    padding: 14px 18px;
    font-size: 18px;
    font-weight: bold;
}

.penpal-card-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.penpal-card-table td {
    padding: 8px 10px;
    border: 1px solid #ececec;
    vertical-align: middle;
}

.penpal-card-table tr:nth-child(even) {
    background: #f8f8f8;
}

.penpal-card-table td:first-child,
.penpal-card-table td:nth-child(3) {
    font-weight: bold;
    width: 30%;
}