body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    color: #222;
    line-height: 1.5;
}

a {
    color: navy;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #dddddd;
}

.site-header-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.brand {
    font-size: 1.4rem;
    font-weight: bold;
}

.site-nav,
.account-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.logout-form {
    display: inline;
    margin: 0;
}

.logout-form button {
    font: inherit;
    padding: 6px 10px;
    cursor: pointer;
}

.page-shell {
    max-width: 700px;
    margin: 24px auto;
    padding: 0 16px 32px;
}

.recipe-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recipe-card,
.profile-card,
.detail-card,
.login-card,
.search-block {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.recipe-card img,
.detail-card img,
.profile-intro img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.recipe-card-body h2,
.detail-card h1,
.profile-card h1,
.login-card h1 {
    margin-top: 0;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    background: white;
    color: red;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.profile-intro {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.profile-intro>div:first-child {
    flex: 0 0 160px;
}

.profile-intro>div:last-child {
    flex: 1;
    min-width: 220px;
}

.recipe-info {
    margin: 16px 0;
}

.recipe-columns {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.recipe-columns section {
    flex: 1;
    min-width: 240px;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.search-form label {
    width: 100%;
    font-weight: bold;
}

.search-form input {
    flex: 1;
    min-width: 220px;
    padding: 10px;
    font: inherit;
}

.search-form button,
.login-form button {
    padding: 10px 14px;
    font: inherit;
    cursor: pointer;
}

.login-form input {
    width: 100%;
    max-width: 320px;
    padding: 10px;
    font: inherit;
}

.error-message {
    color: #b00020;
}

@media (max-width: 600px) {
    .site-header-inner {
        align-items: flex-start;
    }

    .recipe-columns {
        flex-direction: column;
        gap: 16px;
    }

    .profile-intro {
        flex-direction: column;
    }
}

.recipe-meta {
    margin-top: 12px;
    color: #555555;
    font-size: 0.95rem;
}

.recipe-photo {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.ingredients-section,
.steps-section {
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    padding: 12px;
}

.comments-section {
    margin-top: 24px;
    border-top: 1px solid #e5e5e5;
    padding-top: 20px;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.comment-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    font: inherit;
    resize: vertical;
}

.comment-form-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.comment-help,
.comment-feedback,
.comment-login-note,
.comment-empty {
    color: #ff0000;
}

.comment-form button {
    padding: 10px 14px;
    font: inherit;
    cursor: pointer;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.comment-card {
    border: 1px solid #dddddd;
    border-radius: 8px;
    padding: 12px;
    background: #fcfcfc;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    color: #555555;
}

.comment-card p {
    margin-bottom: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.comment-login-note a {
    text-decoration: none;
}

.comment-login-note a:hover {
    text-decoration: underline;
    text-decoration-color: #b00020;
    text-underline-offset: 2px;
    text-decoration-thickness: 2px;
}