/* Shared recipe and creator profile surfaces for LINE LIFF and Web. */
.recipe-intro { margin: 8px 0 24px; }
.recipe-eyebrow { display: block; color: var(--brand-strong); font-size: 10px; letter-spacing: .16em; font-weight: 750; margin-bottom: 8px; }
.recipe-intro h1 { font-size: 25px; letter-spacing: -.04em; line-height: 1.4; margin: 0 0 8px; }
.recipe-intro p { color: var(--muted); font-size: 13px; margin: 0; }
.recipe-library-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.recipe-library-tabs a { flex: 1; padding: 12px 5px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 650; border-bottom: 2px solid transparent; }
.recipe-library-tabs .is-active { color: var(--brand-strong); border-bottom-color: var(--brand); }
.recipe-library-tabs a span { font-size: 12px; margin-left: 4px; }
.recipe-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; padding: 4px 6px 4px 12px; }
.recipe-search svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.recipe-search input { width: 100%; min-width: 0; border: 0; background: transparent; outline: none; padding: 9px 0; font-size: 14px; }
.recipe-search:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.recipe-search button { border: 0; background: var(--brand-soft); color: var(--brand-strong); border-radius: 8px; padding: 8px; flex-shrink: 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.recipe-filters { display: flex; gap: 8px; margin: 14px 0 24px; }
.recipe-filters a { font-size: 12px; padding: 7px 15px; border-radius: 24px; color: var(--muted); background: var(--surface-muted); }
.recipe-filters .is-active { color: white; background: var(--brand-strong); }
.recipe-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.recipe-section-title h2 { font-size: 17px; margin: 0; }
.recipe-section-title > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 14px; }
.recipe-card { min-width: 0; }
.recipe-card-photo { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--brand-soft); }
.recipe-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.recipe-card-photo noscript img { position: absolute; inset: 0; }
.recipe-card-photo:hover img { transform: scale(1.03); }
.recipe-photo-tag { position: absolute; top: 8px; left: 8px; font-size: 10px; line-height: 1; padding: 6px 8px; border-radius: 6px; background: #ffffffed; color: var(--brand-deep); font-weight: 700; }
.recipe-saved-mark { position: absolute; right: 8px; bottom: 8px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #fffffff0; color: var(--brand-strong); }
.recipe-saved-mark svg { width: 15px; height: 15px; fill: currentColor; }
.recipe-card-copy { padding-top: 10px; }
.recipe-card h3 { margin: 0 0 6px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.recipe-author-label { display: flex; gap: 5px; align-items: center; color: var(--muted); font-size: 11px; }
.tiny-avatar { object-fit: cover; width: 20px; height: 20px; display: inline-grid; place-items: center; color: var(--brand-strong); background: var(--brand-soft); border-radius: 50%; font-size: 10px; flex-shrink: 0; }
.official-seal { display: inline-grid; place-items: center; width: 17px; height: 17px; background: var(--brand); color: white; border-radius: 50%; font-size: 10px; margin-right: 2px; }
.recipe-placeholder { height: 100%; display: grid; place-items: center; background: linear-gradient(145deg,#eef5e8,#daeadd); color: var(--brand); }
.recipe-placeholder svg { width: 44px; height: 44px; stroke-width: 1.2; }
.recipe-empty { padding: 32px 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin: 12px 0 24px; }
.recipe-empty h2 { font-size: 18px; margin: 12px 0 8px; }
.recipe-empty p { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.empty-recipe-icon { display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); width: 48px; height: 48px; border-radius: 14px; font-size: 29px; }
.recipe-empty .primary-button { width: auto; display: inline-flex; padding-inline: 22px; }
.recipe-pagination { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 28px; }
.recipe-pagination a { min-height: 38px; font-size: 12px; }
.recipe-pagination > span { color: var(--muted); font-size: 12px; }
.recipe-cover { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; margin-bottom: 22px; }
.recipe-detail-heading h1 { font-size: 27px; line-height: 1.35; margin: 6px 0 16px; overflow-wrap: anywhere; }
.recipe-author-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; font-size: 13px; }
.recipe-author-row a { display: flex; align-items: center; gap: 8px; }
.recipe-author-row .tiny-avatar { object-fit: cover; width: 32px; height: 32px; font-size: 14px; }
.recipe-author-row small { display: block; color: var(--muted); font-size: 10px; }
.recipe-visibility { color: var(--muted); font-size: 11px; white-space: nowrap; }
.recipe-save-form { margin-bottom: 28px; }
.recipe-save-form button { width: 100%; gap: 8px; }
.recipe-save-form svg { width: 17px; height: 17px; }
.recipe-detail-section { border-top: 1px solid var(--line); padding: 22px 0; }
.recipe-detail-section .recipe-section-title > span { font-size: 9px; letter-spacing: .12em; }
.recipe-ingredients { border-left: 3px solid var(--brand); padding: 4px 0 4px 16px; line-height: 2; font-size: 14px; }
.recipe-body-text { font-size: 14px; line-height: 1.85; margin-bottom: 12px; overflow-wrap: anywhere; }
.recipe-section-image { display: block; width: 100%; height: auto; border-radius: 12px; margin-top: 12px; }
.recipe-steps { list-style: none; margin: 0; padding: 0; }
.recipe-steps li { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 12px; margin: 22px 0 28px; }
.recipe-step-number { display: grid; place-items: center; height: 30px; width: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; font-weight: 750; }
.recipe-sources { border-top: 1px solid var(--line); padding: 18px 0; font-size: 12px; color: var(--muted); }
.recipe-sources a { display: block; text-decoration: underline; margin-top: 10px; overflow-wrap: anywhere; }
.recipe-owner-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 15px; }
.recipe-delete { border: 0; padding: 14px; background: none; color: var(--danger); font-size: 13px; cursor: pointer; }
.recipe-form-section { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 16px; margin: 0 0 16px; }
.recipe-form-section h2 { font-size: 16px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.recipe-form-section h2 > span { font-size: 11px; color: var(--brand-strong); font-weight: 750; }
.recipe-editor label:not(.recipe-toggle):not(.recipe-inline-check) { display: block; font-size: 13px; font-weight: 650; margin: 18px 0 8px; }
.recipe-editor label small { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 5px; }
.recipe-editor input:not([type=checkbox]):not([type=file]), .recipe-editor textarea { display: block; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); font-size: 14px; color: var(--ink); }
.recipe-editor textarea { resize: vertical; min-height: 95px; line-height: 1.65; }
.recipe-editor input:focus-visible, .recipe-editor textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.recipe-photo-field { margin-top: 12px; }
.recipe-editor input[type=file] { display: block; width: 100%; font-size: 11px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px; }
.recipe-editor input[type=file]::file-selector-button { color: var(--brand-strong); border: 0; background: var(--brand-soft); padding: 7px 9px; border-radius: 6px; font: inherit; margin-right: 8px; cursor: pointer; }
.recipe-upload-preview { display: block; width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.recipe-photo-clear { width: auto; min-height: 44px; padding: 8px 12px; font-size: 12px; margin-bottom: 8px; }
.recipe-photo-clear[hidden] { display: none; }
.recipe-step-editor { border-top: 1px solid var(--line); padding: 16px 0; }
.recipe-step-editor:first-child { padding-top: 0; border-top: 0; }
.recipe-step-editor-heading { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 8px; }
.recipe-step-editor-heading strong { color: var(--brand-strong); }
.recipe-step-editor-heading button { border: none; background: none; color: var(--muted); padding: 8px; cursor: pointer; font-size: 12px; }
.recipe-step-editor textarea { margin-bottom: 10px; }
.recipe-step-editor [data-step-photo] { margin-top: 8px; }
.recipe-add-step { width: 100%; min-height: 42px; }
.recipe-add-step[hidden] { display: none; }
.recipe-publish-section { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: start; gap: 16px; }
.recipe-publish-section h2 { margin: 0 0 8px; }
.recipe-publish-section p { margin: 0; font-size: 12px; color: var(--muted); }
.recipe-toggle { position: relative; display: block; width: 44px; height: 34px; padding: 4px 0; margin: 0; cursor: pointer; }
.recipe-toggle input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; border: 0; opacity: 0; }
.recipe-toggle i { position: relative; display: block; width: 44px; height: 26px; border-radius: 99px; background: #a6b3aa; }
.recipe-toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: transform .15s; }
.recipe-toggle input:checked + i { background: var(--brand); }
.recipe-toggle input:checked + i::after { transform: translateX(18px); }
.recipe-toggle input:focus-visible + i { outline: 3px solid var(--brand); outline-offset: 3px; }
.recipe-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.recipe-inline-check { display: flex; gap: 7px; align-items: center; font-size: 12px; margin: 10px 0; color: var(--muted); }
.recipe-inline-check input[type=checkbox] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; }
.recipe-submit { width: 100%; margin-top: 8px; }
.recipe-form-errors { background: var(--danger-soft); color: var(--danger); padding: 16px; border-radius: 12px; margin-bottom: 20px; font-size: 13px; }
.recipe-form-errors p { margin: 8px 0 0; }
.creator-profile { padding: 8px 0 20px; }
.creator-top-row { display: flex; align-items: center; gap: 24px; margin-bottom: 18px; }
.creator-avatar { display: block; height: 80px; width: 80px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; }
.creator-initial { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); font-size: 30px; font-weight: 650; }
.creator-metrics { display: flex; flex: 1; justify-content: space-around; gap: 14px; }
.creator-metrics > * { text-align: center; min-width: 32px; }
.creator-metrics strong { display: block; font-size: 22px; font-weight: 750; line-height: 1.3; }
.creator-metrics span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.creator-profile h1 { font-size: 21px; margin: 0 0 7px; }
.creator-bio { font-size: 13px; line-height: 1.75; margin-bottom: 18px; white-space: normal; overflow-wrap: anywhere; }
.creator-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.creator-actions a { min-height: 40px; padding: 9px 6px; font-size: 12px; }
.profile-recipe-grid { gap: 16px 10px; margin-bottom: 20px; }
.profile-grid-heading { margin-top: 5px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.profile-all-recipes { display: block; color: var(--brand-strong); font-size: 12px; text-align: center; padding: 6px 0 20px; }
.profile-account-settings { margin: 20px 0 0; border-top: 1px solid var(--line); }
.profile-account-settings > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; padding: 20px 0; font-size: 14px; font-weight: 650; }
.profile-account-settings > summary::-webkit-details-marker { display: none; }
.profile-account-settings > summary > svg { width: 18px; height: 18px; margin-left: auto; }
.profile-account-settings[open] > summary > svg { transform: rotate(180deg); }
@media(min-width:900px) { .web-body .recipe-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; } .web-body .recipe-intro h1 { font-size: 30px; } .web-body .recipe-cover { max-height: 460px; } .web-body .recipe-editor { max-width: 760px; } .web-body .creator-profile { max-width: 620px; } }
@media(prefers-reduced-motion:reduce) { .recipe-card-photo img, .recipe-toggle i::after { transition: none; } }
