@charset "UTF-8";
:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; color: #252525; background: #fff; font-size: 14px; }
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #7c91a1; outline-offset: 2px; }
.toolbar { min-height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid #e8e8e8; }
.app-name { font-size: 15px; font-weight: 600; text-decoration: none; margin-right: 12px; flex-shrink: 0; }
input[type=search] { width: 310px; min-width: 100px; padding: 7px 10px; border: 1px solid #d8d8d8; border-radius: 4px; background: #fff; }
input::placeholder { color: #909090; }
select { max-width: 100%; border: 1px solid #ddd; border-radius: 4px; padding: 6px 8px; background: #fff; }
#author { max-width: 170px; }
#result-count { color: #858585; font-size: 12px; margin-left: auto; white-space: nowrap; }
.ingredient-bar { flex-shrink: 0; padding: 7px 16px; border-bottom: 1px solid #e8e8e8; }
.ingredient-bar nav { display: flex; flex-wrap: wrap; gap: 3px 6px; }
.ingredient-bar nav[hidden] { display: none; }
.ingredient-bar button { background: none; border: 0; border-radius: 3px; padding: 5px 7px; color: #666; font-size: 13px; white-space: nowrap; }
.ingredient-bar button span { color: #999; margin-left: 5px; font-size: 10px; font-variant-numeric: tabular-nums; }
.ingredient-bar button[aria-pressed=true] { color: #222; background: #ededed; font-weight: 600; }
.ingredient-bar button:hover:not(:disabled) { background: #f1f1f1; }
.ingredient-bar button:disabled { opacity: .4; cursor: default; }
#vegetable-filters { margin-top: 5px; padding-top: 5px; border-top: 1px solid #f0f0f0; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(200px, 28vw, 270px) minmax(0, 1fr); }
.catalog { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid #e8e8e8; }
.catalog-heading { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #888; font-size: 12px; }
.catalog-heading select { min-width: 0; flex: 1; border: 0; font-size: 12px; padding: 4px; }
.catalog-heading button { background: none; border: 0; padding: 4px 0; font-size: 12px; }
.catalog-heading button:disabled { opacity: .35; cursor: default; }
#recipe-list { min-height: 0; flex: 1; overflow: auto; padding: 0 8px 16px; scrollbar-width: thin; overflow-anchor: none; scroll-padding-top: 34px; }
.directory-group h2 { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; margin: 0; padding: 7px 10px; font-size: 12px; font-weight: 600; line-height: 1.5; color: #999; background: #fff; border-bottom: 1px solid #f2f2f2; }
.directory-group h2 span { font-weight: 400; font-size: 10px; }
.recipe-row { width: 100%; border: 0; background: none; border-radius: 3px; display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; text-align: left; line-height: 1.5; }
.recipe-row:hover { background: #f6f6f6; }
.recipe-row[aria-current=true] { background: #ededed; font-weight: 600; }
.recipe-row .name { min-width: 0; overflow-wrap: anywhere; }
.recipe-row .count { margin-left: auto; font-size: 11px; font-weight: 400; color: #999; flex-shrink: 0; }
#detail { min-width: 0; overflow: auto; padding: 26px 28px 60px; scrollbar-width: thin; }
.recipe-header, .recipe-text { max-width: 950px; }
.recipe-header h1 { font-size: 23px; font-weight: 600; margin: 0 0 15px; line-height: 1.5; overflow-wrap: anywhere; }
.version-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #777; }
.version-bar select { color: #555; font-size: 12px; }
.video-title { font-size: 12px; color: #888; margin: 12px 0 0; line-height: 1.7; }
.recipe-text { margin: 26px 0 0; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC", monospace; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.message { color: #888; font-size: 13px; line-height: 1.8; padding: 8px 10px; }
.message button { background: none; border: 0; padding: 0; color: #555; text-decoration: underline; }
.back-to-list { display: none; }
@media (max-width: 850px) {
  .toolbar { gap: 8px; padding: 10px 14px; }
  .app-name { margin-right: 0; }
  input[type=search] { flex: 1; width: auto; }
  #author { max-width: 145px; }
  .ingredient-bar { padding: 6px 10px; }
  .ingredient-bar nav { gap: 2px 3px; }
  #detail { padding: 22px 20px 50px; }
}
@media (max-width: 600px) {
  body { height: auto; min-height: 100dvh; }
  .toolbar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 12px 14px; gap: 10px; }
  .app-name { margin-right: 0; }
  input[type=search] { flex: 1; width: auto; font-size: 16px; }
  #author { font-size: 13px; }
  #result-count { font-size: 11px; }
  .ingredient-bar button { padding: 5px 6px; }
  .ingredient-bar button span { display: none; }
  .workspace { height: auto; display: block; }
  .catalog { height: clamp(280px, 48dvh, 480px); border-right: 0; border-bottom: 1px solid #e8e8e8; }
  .catalog-heading { padding: 8px 14px; }
  .catalog-heading select { flex: 0 1 140px; margin-left: auto; }
  .recipe-row { padding: 7px 6px; }
  #detail { overflow: visible; padding: 22px 16px 40px; scroll-margin-top: 12px; }
  .recipe-header h1 { font-size: 21px; }
  .recipe-text { font-size: 14px; margin-top: 22px; }
  .back-to-list { display: inline; margin-left: auto; }
}
@media print {
  @page { margin: 16mm; }
  body { height: auto; display: block; }
  .toolbar, .ingredient-bar, .catalog, .version-bar { display: none; }
  .workspace { display: block; height: auto; }
  #detail { overflow: visible; padding: 0; }
  .recipe-text { font-size: 11px; }
}
