/* Homemade recipes of the design renewal (#101: /homemade and /homemade/show/:id; the cards are reused by the user pages, #106).
   No approved mock-up: the cards follow the recipe band of the top page (ume-recipe-grid / ume-recipe-card, whose photo frame
   contains the photo), the detail follows the renewed brand detail. Shared controls live in /css/umeshu/umeshu.css and are not overridden. */

/* Texts typed by members keep their line breaks and spaces as the legacy .public-text did (no nofilter / nl2br). */
.homemade-text, .homemade-card-other { white-space: pre-wrap; overflow-wrap: anywhere; }

/* List cards (_ume/homemade_list.tpl). */
.homemade-list > li { min-width: 0; }
.homemade-card { min-width: 0; }
.homemade-no-photo { font-size: var(--ume-text-xs); color: var(--ume-color-muted); }
.homemade-card h3 a { overflow-wrap: anywhere; }
.homemade-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; font-size: var(--ume-text-xs); color: var(--ume-color-muted); }
.homemade-card-owner { min-width: 0; overflow-wrap: anywhere; }
.homemade-card-owner a { color: var(--ume-color-link); text-decoration: underline; }
.homemade-status { display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--ume-color-primary); color: var(--ume-color-text); font-size: var(--ume-text-xs); line-height: 1.8; white-space: nowrap; }
.homemade-card-ingredients { display: grid; gap: 2px; margin-top: 10px; font-size: var(--ume-text-xs); line-height: 1.8; }
/* A value that does not fit beside its label moves below it instead of breaking every character (narrow two-column cards). */
.homemade-card-ingredients > div { display: flex; flex-wrap: wrap; column-gap: 8px; min-width: 0; }
.homemade-card-ingredients dt { flex: none; color: var(--ume-color-muted); }
.homemade-card-ingredients dd { flex: 1 1 6em; min-width: 0; overflow-wrap: anywhere; }
/* Up to 200 characters of other ingredients: the card shows the first lines, the detail page all of them. */
.homemade-card-other { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.homemade-list-empty p { word-break: auto-phrase; }

/* List page: the composition (heading, search, results) comes from brand-list.css. */
.homemade-search-status { margin-top: 32px; }
.homemade-results .brand-list-results-title h2 { min-width: 0; overflow-wrap: anywhere; }
.homemade-register { margin-top: 48px; }
.homemade-register a { color: var(--ume-color-link); text-decoration: underline; }

/* Detail page. */
.homemade-detail-page { padding-block: 28px 76px; }
.homemade-detail-heading { margin-block: 38px 34px; }
.homemade-detail-owner-line { margin-top: 16px; overflow-wrap: anywhere; }
.homemade-detail-owner-line a { color: var(--ume-color-link); text-decoration: underline; }
.homemade-detail-name { overflow-wrap: anywhere; }
.homemade-detail-status { margin-top: 12px; }
.homemade-detail-basic { margin-top: 44px; }
.homemade-detail-info { min-width: 0; }
.homemade-details { margin-top: 20px; }
.homemade-elapsed { display: inline-block; margin-top: 4px; }
strong.homemade-elapsed { color: var(--ume-color-link); }

/* Photos: every frame keeps its size and contains the photo, whatever its orientation (#95). The first one is large. */
.homemade-detail-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 480px; justify-self: center; }
.homemade-detail-photo { min-width: 0; }
.homemade-detail-photo:first-child, .homemade-detail-no-photo { grid-column: 1 / -1; }
.homemade-detail-photo-frame { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; overflow: hidden; background: var(--ume-color-photo); border-radius: var(--ume-radius-control); }
.homemade-detail-photo-frame img { width: 100%; height: 100%; object-fit: contain; }
.homemade-detail-photo figcaption { margin-top: 6px; }
.homemade-photo-delete-button { width: 100%; padding-inline: 4px; word-break: auto-phrase; }
.homemade-detail-no-photo { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 24px; text-align: center; background: var(--ume-color-photo); border-radius: var(--ume-radius-control); color: var(--ume-color-muted); font-size: var(--ume-text-sm); word-break: auto-phrase; }

.homemade-detail-section { margin-top: 64px; }
.homemade-detail-section-title { margin-bottom: 20px; word-break: auto-phrase; }
.homemade-memo { max-width: 46em; line-height: 2; }

/* Owner controls (same conditions and forms as before; the form pages move with #108). */
.homemade-owner-tools { padding-top: 8px; }
.homemade-owner-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.homemade-photo-form { display: grid; justify-items: start; gap: 16px; margin-top: 28px; max-width: 640px; }
.homemade-photo-field { width: 100%; }
.homemade-photo-form input[type="file"] { max-width: 100%; }
.homemade-blogparts { margin-top: 40px; display: grid; gap: 16px; }
.homemade-blogparts h3 { font-size: var(--ume-text-lg); font-weight: var(--ume-weight-bold); }
.homemade-blogparts > p { max-width: 46em; }
.homemade-detail-more { margin-top: 56px; }
/* The owner name is stored data: the same look as ume-text-link (which never wraps), but long names may wrap. */
.homemade-detail-list-link { min-width: 0; color: var(--ume-color-link); font-weight: var(--ume-weight-bold); text-decoration: underline; overflow-wrap: anywhere; word-break: auto-phrase; }
.homemade-detail-list-link:hover { text-decoration-thickness: 2px; }

@media (max-width: 600px) {
  .homemade-register { margin-top: 36px; }
  .homemade-detail-page { padding-block: 22px 48px; }
  .homemade-detail-heading { margin-block: 28px; }
  .homemade-detail-basic { margin-top: 28px; }
  .homemade-detail-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .homemade-detail-section { margin-top: 48px; }
}
