/* ONIGIRI GO — balanced square-photo card layout, revision 2 */
.recipe-sheet .recipes-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:minmax(0,1fr);
  gap:12px;
  align-content:stretch;
}
.recipe-sheet[data-layout="one"] .recipes-grid,
.recipe-sheet[data-layout="two"] .recipes-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.recipe-sheet .product-card,
.recipe-sheet[data-layout="one"] .product-card{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.recipe-sheet .product-head,
.recipe-sheet[data-layout="one"] .product-head{
  flex:none;
  width:100%;
  padding:11px 12px 6px;
  display:flex;
  flex-direction:row;
  align-items:start;
  justify-content:space-between;
}
.recipe-sheet .product-body,
.recipe-sheet[data-layout="one"] .product-body{
  flex:1;
  width:100%;
  min-height:0;
  padding:0 12px 9px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:6px;
}
.recipe-sheet .product-photo,
.recipe-sheet[data-layout="one"] .product-photo{
  flex:none;
  width:min(100%,214px);
  height:auto;
  aspect-ratio:1 / 1;
  min-height:0;
  max-height:none;
  margin:0 auto;
  border-radius:8px;
  align-self:center;
}
.recipe-sheet .product-photo img{
  object-fit:cover;
  object-position:center center;
  width:100%;
  height:100%;
}
.recipe-sheet .recipe-content,
.recipe-sheet[data-layout="one"] .recipe-content{
  width:100%;
  padding:0;
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.recipe-sheet .recipe-row,
.recipe-sheet[data-layout="one"] .recipe-row{
  padding:4px 0;
}
.recipe-sheet .card-warning{font-size:7px;}
.recipe-sheet[data-category="pork"] .product-photo,
.recipe-sheet[data-layout="one"] .product-photo{width:min(100%,130px);}
.recipe-sheet[data-category="pork"] .product-head,
.recipe-sheet[data-layout="one"] .product-head{padding-top:8px;padding-bottom:4px;}
.recipe-sheet[data-category="pork"] .product-body,
.recipe-sheet[data-layout="one"] .product-body{gap:4px;padding-bottom:7px;}
.recipe-sheet[data-category="pork"] .recipe-row,
.recipe-sheet[data-layout="one"] .recipe-row{padding:2px 0;}
.recipe-sheet[data-category="pork"] .product-name,
.recipe-sheet[data-layout="one"] .product-name{font-size:12px;}
.recipe-sheet[data-category="pork"] .product-alt,
.recipe-sheet[data-layout="one"] .product-alt{font-size:8px;}
@media screen and (min-width:771px) {
 .recipe-sheet{scroll-margin-top:126px;}
}
@media screen and (max-width:770px) {
 .recipe-sheet .recipes-grid,
 .recipe-sheet[data-layout="one"] .recipes-grid,
 .recipe-sheet[data-layout="two"] .recipes-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
 }
 .recipe-sheet .product-card,
 .recipe-sheet[data-layout="one"] .product-card{display:flex;flex-direction:column;}
 .recipe-sheet .product-head,
 .recipe-sheet[data-layout="one"] .product-head{width:100%;padding:12px 12px 9px;}
 .recipe-sheet .product-body,
 .recipe-sheet[data-layout="one"] .product-body{width:100%;padding:0 13px 12px;gap:10px;display:flex;flex-direction:column;}
 .recipe-sheet .product-photo,
 .recipe-sheet[data-category="pork"] .product-photo,
 .recipe-sheet[data-layout="one"] .product-photo{width:min(100%,180px);aspect-ratio:1;min-height:0;max-height:none;}
 .recipe-sheet .recipe-content,
 .recipe-sheet[data-layout="one"] .recipe-content{padding:0;}
 .recipe-sheet .recipe-row,
 .recipe-sheet[data-layout="one"] .recipe-row{padding:6px 0;font-size:11px;}
 .recipe-sheet .product-name,
 .recipe-sheet[data-layout="one"] .product-name{font-size:15px;}
 .recipe-sheet .product-alt,
 .recipe-sheet[data-layout="one"] .product-alt{font-size:10px;}
 .recipe-sheet .product-body{min-height:0;}
}
@page{size:A4 portrait;margin:0}
@media print {
 .recipe-sheet .recipes-grid,
 .recipe-sheet[data-layout="one"] .recipes-grid,
 .recipe-sheet[data-layout="two"] .recipes-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:minmax(0,1fr)!important;
  gap:10px!important;
  flex:1!important;
 }
 .recipe-sheet .product-card,
 .recipe-sheet[data-layout="one"] .product-card,
 .recipe-sheet[data-layout="two"] .product-card{display:flex!important;flex-direction:column!important;min-height:0!important;}
 .recipe-sheet .product-head,
 .recipe-sheet[data-layout="one"] .product-head,
 .recipe-sheet[data-layout="two"] .product-head{width:100%!important;display:flex!important;flex-direction:row!important;padding:8px 11px 5px!important;}
 .recipe-sheet .product-body,
 .recipe-sheet[data-layout="one"] .product-body,
 .recipe-sheet[data-layout="two"] .product-body{width:100%!important;display:flex!important;flex-direction:column!important;gap:5px!important;padding:0 11px 8px!important;min-height:0!important;}
 .recipe-sheet .product-photo,
 .recipe-sheet[data-layout="one"] .product-photo,
 .recipe-sheet[data-layout="two"] .product-photo{width:min(100%,218px)!important;height:auto!important;aspect-ratio:1/1!important;min-height:0!important;max-height:none!important;align-self:center!important;}
 .recipe-sheet[data-category="pork"] .product-photo,
 .recipe-sheet[data-layout="one"] .product-photo{width:min(100%,130px)!important;}
 .recipe-sheet .recipe-content,
 .recipe-sheet[data-layout="one"] .recipe-content,
 .recipe-sheet[data-layout="two"] .recipe-content{padding:0!important;width:100%!important;flex:1!important;}
 .recipe-sheet .recipe-row,
 .recipe-sheet[data-layout="one"] .recipe-row{padding:2px 0!important;font-size:9px!important;}
 .recipe-sheet .recipe-qty{font-size:11px!important;}
 .recipe-sheet[data-category="pork"] .product-name,
 .recipe-sheet[data-layout="one"] .product-name{font-size:11px!important;}
 .recipe-sheet .card-warning{font-size:7px!important;}
}

@media print { .recipe-sheet .card-warning { display:none!important; } }

@media screen and (max-width:770px){
 .intro{display:none!important}
 main{padding-top:12px}
 .sheet-kicker{flex-wrap:nowrap;white-space:nowrap}
 .kicker-left{font-size:8px;letter-spacing:.075em;white-space:nowrap}
 .kicker-right{display:none!important}
}

/* v3 — kitchen-readable typography. Keep A4 6-page grid unchanged. */
@media screen {
  .recipe-sheet .product-name,
  .recipe-sheet[data-layout="one"] .product-name {font-size:16px;line-height:1.3;}
  .recipe-sheet .product-alt,
  .recipe-sheet[data-layout="one"] .product-alt {font-size:11px;line-height:1.35;}
  .recipe-sheet .recipe-row,
  .recipe-sheet[data-layout="one"] .recipe-row,
  .recipe-sheet[data-category="pork"] .recipe-row {font-size:13px;line-height:1.3;padding:5px 0;}
  .recipe-sheet .recipe-qty {font-size:16px;line-height:1.3;}
  .recipe-sheet .base-chip-label {font-size:12px;}
  .recipe-sheet .base-chip-num {font-size:15px;}
  .recipe-sheet .base-heading {font-size:11px;}
  .recipe-sheet .sheet-notice {font-size:12px;line-height:1.5;}
  .recipe-sheet .product-index {font-size:10px;}
}
@media screen and (max-width:770px) {
  .recipe-sheet .product-name,
  .recipe-sheet[data-layout="one"] .product-name {font-size:17px;}
  .recipe-sheet .product-alt,
  .recipe-sheet[data-layout="one"] .product-alt {font-size:12px;}
  .recipe-sheet .recipe-row,
  .recipe-sheet[data-layout="one"] .recipe-row,
  .recipe-sheet[data-category="pork"] .recipe-row {font-size:14px;padding:7px 0;}
  .recipe-sheet .recipe-qty {font-size:17px;}
  .recipe-sheet .base-chip-label {font-size:12px;}
  .recipe-sheet .base-chip-num {font-size:15px;}
  .recipe-sheet .sheet-notice {font-size:12px;}
  .category-nav button {font-size:11px;}
}
@media print {
  .recipe-sheet .product-name,
  .recipe-sheet[data-layout="one"] .product-name,
  .recipe-sheet[data-category="pork"] .product-name {font-size:15.5px!important;line-height:1.26!important;}
  .recipe-sheet .product-alt,
  .recipe-sheet[data-layout="one"] .product-alt,
  .recipe-sheet[data-category="pork"] .product-alt {font-size:11px!important;}
  .recipe-sheet .recipe-row,
  .recipe-sheet[data-layout="one"] .recipe-row,
  .recipe-sheet[data-category="pork"] .recipe-row {font-size:13.5px!important;line-height:1.24!important;padding:3px 0!important;}
  .recipe-sheet .recipe-qty {font-size:16px!important;line-height:1.2!important;}
  .recipe-sheet .base-chip-label {font-size:11.5px!important;}
  .recipe-sheet .base-chip-num {font-size:14px!important;}
  .recipe-sheet .base-heading {font-size:10.5px!important;}
  .recipe-sheet .sheet-notice {font-size:11.5px!important;}
  .recipe-sheet .sheet-footer {font-size:10px!important;}
  .recipe-sheet .product-index {font-size:10px!important;}
  .recipe-sheet .product-photo {width:min(100%,203px)!important;}
  .recipe-sheet[data-category="pork"] .product-photo,
  .recipe-sheet[data-layout="one"] .product-photo {width:min(100%,111px)!important;}
  .recipe-sheet .product-head,
  .recipe-sheet[data-layout="one"] .product-head,
  .recipe-sheet[data-layout="two"] .product-head {padding:7px 10px 4px!important;}
  .recipe-sheet .product-body,
  .recipe-sheet[data-layout="one"] .product-body,
  .recipe-sheet[data-layout="two"] .product-body {padding:0 10px 6px!important;gap:4px!important;}
}

/* Dense five-item FLUFFY sheets: preserve readable 10pt ingredients without clipping. */
@media print {
 .recipe-sheet[data-layout="one"] .product-photo {width:min(100%,96px)!important;}
 .recipe-sheet[data-layout="one"] .recipe-row {padding:1px 0!important;}
 .recipe-sheet[data-layout="one"] .product-head {padding:5px 10px 2px!important;}
 .recipe-sheet[data-layout="one"] .product-body {gap:2px!important;padding:0 10px 4px!important;}
 .recipe-sheet[data-layout="one"] .product-alt {font-size:10px!important;}
}

@media print {
 .recipe-sheet.is-continued .sheet-footer {display:flex!important;justify-content:space-between!important;align-items:center!important;}
}

/* Last-row clearance for print media with 13.5px ingredient labels. */
@media print {
 .recipe-sheet[data-category="onigirazu"] .product-photo {width:min(100%,187px)!important;}
 .recipe-sheet[data-layout="one"] .product-photo {width:min(100%,88px)!important;}
}
