.blockchain-demo8-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

.blockchain-demo8-button-list {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  margin-bottom: 18px;
}

.blockchain-demo8-card {
  background: #fff;
  padding: 24px;
}

.blockchain-demo8-title-box {
  border-radius: 15px;
  background: #FFF0E8;
  padding: 20px;
}

.blockchain-demo8-title {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 700;
  color: #111827;
}

.blockchain-demo8-desc {
  margin: 0 0 24px;
  color: #6b7280;
  line-height: 1.6;
  font-size: 13px;
}

.blockchain-demo8-section {
  border-radius: 10px;
  margin: 15px 0;
  box-shadow: 1px 1px 8px #00000027;
  padding: 20px;
}

.blockchain-demo8-section-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: #000;
}

.blockchain-demo8-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
}

.blockchain-demo8-field {
  margin-bottom: 16px;
}

.blockchain-demo8-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.blockchain-demo8-field input,
.blockchain-demo8-field textarea,
.blockchain-demo8-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  font-size: 15px;
  background: #fff;
  text-align: center;
}

.blockchain-demo8-field.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blockchain-demo8-field.row label {
  margin-bottom: 0;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 13px;
}

.blockchain-demo8-field.row select,
.blockchain-demo8-field.row input {
  flex: 1;
  height: 44px;
}

@media (max-width: 640px) {

.blockchain-demo8-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}

.blockchain-demo8-field {
  margin-bottom: 16px;
}

.blockchain-demo8-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.blockchain-demo8-field input,
.blockchain-demo8-field textarea,
.blockchain-demo8-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  font-size: 15px;
  background: #fff;
  text-align: center;
}

.blockchain-demo8-field.row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

.blockchain-demo8-field.row label {
  margin-bottom: 0;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 13px;
  width: 20%;
}

.blockchain-demo8-field.row select,
.blockchain-demo8-field.row input {
  flex: 1;
  height: 44px;
  width: 80%;
}


  
}

.bd8-select {
  border-radius: 5px !important;
  border: 1.5px solid #FF7A59 !important;
  padding: 5px 12px !important;
}

.bd8-select[readonly],
.bd8-select:disabled {
  background-color: #E5E7EB !important;
  border-color: #dddfe4 !important;
  color: #999fac !important;
  cursor: not-allowed !important;
}

.bd8-label {
  color: #FF7A59;
}

.blockchain-demo8-box {
  /* border-radius: 10px;
  background-color: #F1F1F1;
  padding: 1px; */
}

.blockchain-demo8-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: #111827;
  color: #fff;
  margin-top: 20px;
}

.blockchain-demo8-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.blockchain-demo8-result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: #f9fafb;
  min-height: 60px;
  line-height: 1.65;
  word-break: break-word;
}

.blockchain-demo8-main-box1,
.blockchain-demo8-main-box2,
.blockchain-demo8-main-box3,
.blockchain-demo8-main-box4 {
  display: none;
}

.blockchain-demo8-main-box1.active,
.blockchain-demo8-main-box2.active,
.blockchain-demo8-main-box3.active,
.blockchain-demo8-main-box4.active {
  display: block;
}

.bd8-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bd8-field label {
  white-space: nowrap;
  font-weight: 600;
  flex-shrink: 0;
}

.bd8-field input {
  flex: 1;
  height: 35px;
  border-radius: 4px;
}

.bd8-p-row-1 {
  margin-bottom: 12px;
}

.bd8-p-row-2,
.bd8-p-row-4 .full {
  width: 100%;
}

.blockchain-demo8-info-box2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bd8-field2 {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bd8-field2 label {
  font-weight: 700;
  font-size: 14px;
}

.bd8-field2 textarea {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px;
  background: #D2D2D2;
  resize: none;
  font-size: 13px;
  line-height: 1.5;
  box-sizing: border-box;
}

.bd8-f-row-1 textarea,
.bd8-f-row-2 textarea {
  height: 100px;
  overflow-y: auto;
}

.bd8-f-row-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bd8-food-ingredients-table {
  width: 100%;
  background: transparent;
  border: none;
}

.bd8-food-ingredients-table thead {
  display: none;
}

.bd8-food-ingredients-table,
.bd8-food-ingredients-table tbody {
  display: block;
}

.bd8-food-ingredients-table tr {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "supplier category . price"
    "info     info     . price";
  column-gap: 8px;
  row-gap: 6px;
  align-items: center;
  text-align: left;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.bd8-food-ingredients-table td {
  padding: 0;
  border: none;
  font-size: 13px;
}

.bd8-food-ingredients-table .bd8-cell-supplier {
  grid-area: supplier;
  font-weight: 700;
  font-size: 15px;
  color: #111827;
}

.bd8-food-ingredients-table .bd8-cell-category {
  grid-area: category;
  justify-self: start;
}

.bd8-food-ingredients-table .bd8-cell-name-origin {
  grid-area: info;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
}

.bd8-food-ingredients-table .bd8-origin::before {
  content: "·";
  margin-right: 4px;
  color: #d1d5db;
}

.bd8-food-ingredients-table .bd8-cell-price {
  grid-area: price;
  text-align: right;
  align-self: center;
}

.bd8-food-ingredients-table .bd8-price-num {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
}

.bd8-food-ingredients-table .bd8-price-unit {
  display: block;
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.bd8-food-ingredients-table tr.bd8-empty-row {
  display: block;
  text-align: center;
  padding: 16px;
}

.bd8-category-chip {
  display: inline-block;
  padding: 2px 8px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 12px;
  color: #4b5563;
}

.safe {
  color: #047857;
  font-weight: 800;
}

.danger {
  color: #b91c1c;
  font-weight: 800;
}

.bd8-success {
  color: #047857;
  font-weight: 700;
  margin-bottom: 8px;
}

.bd8-error {
  color: #b91c1c;
  font-weight: 700;
  margin-bottom: 8px;
}

.bd8-warn {
  color: #b45309;
  font-weight: 700;
  margin-bottom: 8px;
}

.bd8-meta {
  margin-bottom: 6px;
}

.bd8-details {
  margin-top: 10px;
}

.bd8-pre {
  margin-top: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #f9fafb;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  max-height: 420px;
  overflow: auto;
}

.bd8-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0 16px;
}

.bd8-result-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bd8-tab-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 800;
  padding: 0 18px 8px;
  border-bottom: 3px solid #d1d5db;
  cursor: pointer;
}

.bd8-tab-btn.active {
  color: #111827;
  border-bottom-color: #111827;
}

.bd8-explorer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 7px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #004AAB;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.bd8-tab-panel {
  display: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.bd8-tab-panel.active {
  display: block;
}

.bd8-info-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 7px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.bd8-info-row:last-child {
  margin-bottom: 0;
}

.bd8-info-label {
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.bd8-info-value {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  word-break: break-word;
}

.bd8-json-area {
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: #f9fafb;
}

.bd8-json-area summary {
  cursor: pointer;
  font-weight: 700;
  color: #374151;
}

#bd8-result.bd8-empty .bd8-result-head,
#bd8-result.bd8-empty .bd8-tab-panel,
#bd8-result.bd8-empty .bd8-json-area {
  display: none;
}

.blockchain-demo8-info-box-img-box {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  border-radius: 10px;
  background-color: #F1F1F1;
  overflow: hidden;
}

.bd8-icon {
  width: 60px;
  height: auto;
}

.blockchain-demo8-info-box-img-box.has-image {
  height: 240px;
  padding: 0;
}

.blockchain-demo8-info-box-img-box.has-image img {
  width: 180px;
  height: auto;
  object-fit: cover;
}

.bd8-preview {
  width: 240px; 
  height: auto;
}

.blockchain-demo8-menu-box {
  margin-top: 10px;
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.blockchain-demo8-menu-box-left {
  flex: 1;
}

.blockchain-demo8-menu-box-left ul {
  padding-left: 18px;
  margin: 0;
}

.blockchain-demo8-menu-box-left li {
  margin-bottom: 6px;
  font-size: 14px;
}

.blockchain-demo8-menu-box-right {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nutrition-information {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #ffffff;
  border-radius: 15px;
  border: 1px solid #eeeeee;
  padding: 10px 10px;
  margin: 15px 0;
}

.nutrition-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.nt-value {
  font-size: 16px;
  font-weight: 800;
  color: #333333;
  margin-bottom: 4px;
}

.nt-label {
  font-size: 11px;
  color: #999999;
  font-weight: 500;
}

.nt-sodium { color: #FF8800; }  
.nt-protein { color: #00A34D; } 
.nt-fat { color: #00A99D; }     

.caution-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.caution-header img {
  width: 20px;
  height: auto;
}

.caution-header span {
  font-size: 15px;
  font-weight: 700;
}

.blockchain-demo8-disease {
  border: 1px solid #ff4d4d;
  background: #fff5f5;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.blockchain-demo8-disease .caution-header span {
  color: #ff4d4d;
}

.blockchain-demo8-disease p {
  margin: 0 0 0 28px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.blockchain-demo8-allergy {
  border: 1px solid #ff4d4d;
  background: #FFEBE9;
  border-radius: 12px;
  padding: 16px 20px;
}

.blockchain-demo8-allergy .caution-header span {
  color: #ff4d4d;
}

.blockchain-demo8-allergy p {
  margin: 0 0 0 28px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.bd8-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.bd8-modal-overlay.open {
  display: flex;
}

.bd8-modal-box {
  background: #fff;
  border-radius: 16px;
  width: 620px;
  max-width: 95%;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.bd8-modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bd8-modal-title {
  font-size: 18px;
  font-weight: 700;
}

.bd8-btn-close {
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.bd8-modal-sub {
  font-size: 13px;
  color: #9ca3af;
  margin: 10px 0 20px;
}

.bd8-img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bd8-img-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
}

.bd8-img-thumb.selected {
  border-color: #FF7A59;
}

.bd8-img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bd8-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.bd8-btn-confirm {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
}

.bd8-btn-confirm:disabled {
  background: #bfdbfe;
}

.bd8-btn-cancel {
  background: #f1f5f9;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
}

#blockchain-demo8-section-result {
  display: none;
}

.bd8-tx-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.bd8-tx-modal.active {
  display: block;
}

.bd8-tx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.bd8-tx-modal-card {
  position: relative;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  margin: 40px auto;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.bd8-tx-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.bd8-tx-modal-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.bd8-tx-modal-close {
  border: none;
  background: #f3f4f6;
  color: #111827;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}

.bd8-tx-modal-body {
  line-height: 1.6;
}

@media (max-width: 640px) {
  .blockchain-demo8-grid,
  .bd8-p-row-2,
  .bd8-p-row-3,
  .bd8-f-row-2 {
    grid-template-columns: 1fr;
  }

  .blockchain-demo8-button-list,
  .bd8-result-head,
  .blockchain-demo8-menu-box {
    flex-direction: column;
    align-items: stretch;
  }

  .bd8-result-tabs {
    width: 100%;
  }

  .bd8-tab-btn {
    flex: 1;
    padding-left: 8px;
    padding-right: 8px;
  }

  .bd8-explorer-btn {
    width: 100%;
  }

  .bd8-info-row {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .blockchain-demo8-menu-box-right {
    width: 100%;
  }

  .bd8-tx-modal-card {
    margin: 20px auto;
    max-height: calc(100vh - 40px);
  }
}

.bd8-origin-wrap {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.bd8-origin-wrap h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  color: #111827;
}

.bd8-origin-card {
  background: #f1f1f1;
  border-radius: 12px;
  padding: 16px 22px;
}

.bd8-origin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
}

.bd8-origin-row span {
  color: #374151;
}

.bd8-origin-row strong {
  color: #111827;
  font-weight: 700;
}

.bd8-origin-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 14px;
  color: #374151;
}

.bd8-origin-history-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bd8-origin-link-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: #9ca3af;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 640px) {
  .bd8-origin-wrap {
    grid-template-columns: 1fr;
  }
}

#blockchain-demo8-history-section {
  display: none !important;
}

.bd8-progress-bar {
  position: relative;
  height: 12px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}

#bd8-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  border-radius: 999px;
  transition: width 0.08s linear;
}

.bd8-complete #bd8-progress-fill {
  animation: none;
  left: 0;
  width: 100%;
  background: #22c55e;
}

.bd8-log-box {
  height: 220px;
  overflow-y: auto;
  background: #020617;
  padding: 12px;
  border-radius: 14px;
  font-family: monospace;
  font-size: 13px;
}

.bd8-log-line {
  color: #86efac;
  margin-bottom: 4px;
}

@keyframes bd8ScanBar {
  0% { left: -40%; }
  100% { left: 100%; }
}


.bd8-banner-top-text {
  padding: 60px 0 0 50px;
  font-size: 26px;
  line-height: 1.4;
  color: #333;
  border-radius: 0;
}

.bd8-banner-top-text strong {
  font-weight: 800;
}

.bd8-banner-top-text img {
  width: 200px;
}

.bd8-banner-button-area {
  display: flex;
  align-items: flex-end;
  background: transparent;
  margin-top: auto;
}

.bd8-main-action-btn {
  background-color: #FF531F;
  color: #fff;
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 250px;
  border-radius: 0;
  box-sizing: border-box;
}

.bd8-main-action-btn .main-label {
  font-size: 20px;
  font-weight: 700;
}

.bd8-main-action-btn .sub-label {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 5px;
}

.bd8-step-buttons {
  display: flex;
  flex: 1;
  height: 75px;
  background: #fff;
  border-top: 1px solid #ccc;
  box-sizing: border-box;
}

.blockchain-demo8-button {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  cursor: pointer;
  background: #fff;
  border-right: 1px solid #ddd;
  border-radius: 0 !important;
  transition: background 0.2s;
  box-sizing: border-box;
}

.blockchain-demo8-button:last-child {
  border-right: none;
}

.blockchain-demo8-button .step-no {
  font-size: 11px;
  color: #888;
  margin-bottom: 3px;
}

.blockchain-demo8-button .step-name {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  text-align: center;
}

.blockchain-demo8-button.active {
  background-color: #fff !important;
  position: relative;
  box-shadow: inset 0 -5px 0 #FF531F;
}

.blockchain-demo8-button.active .step-name,
.blockchain-demo8-button.active .step-no {
  color: #FF531F;
}

.blockchain-demo8-wrap {
  padding: 0;
}

.bd8-loading-box {
  text-align: center;
  padding: 48px 20px;
  background: #fff;
  border-radius: 18px;
}

.bd8-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border: 5px solid #e5e7eb;
  border-top: 5px solid #111827;
  border-radius: 50%;
  animation: bd8-spin 1s linear infinite;
}

.bd8-loading-box p {
  margin: 0;
  font-weight: 800;
  color: #111827;
}

.bd8-loading-sub {
  margin-top: 8px !important;
  font-size: 13px;
  font-weight: 500 !important;
  color: #6b7280 !important;
}

@keyframes bd8-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.bd8-json-area {
  display: none !important;
}

.bd8-info-value a {
  color: inherit;
  text-decoration: none;
}

.bd8-info-value a:hover {
  color: inherit;
  text-decoration: none;
}

.bd8-menu-item {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.bd8-menu-icons img {
  width: 18px;
  margin-left: 6px;
}

.bd8-icon-sm {
  width: 16px;
}

.bd8-menu-icons {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bd8-zoomable-img {
  cursor: zoom-in;
}

.bd8-image-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
}

.bd8-image-zoom-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bd8-image-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.bd8-image-zoom-card {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}

.bd8-image-zoom-card img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 12px;
}

.bd8-image-zoom-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.bd8-analysis-progress-bar {
  position: relative;
  height: 12px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}

#bd8-analysis-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  border-radius: 999px;
  transition: width 0.08s linear;
}

.bd8-banner-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  max-width: 860px;
  margin: 0 auto 30px;
  min-height: 280px;

  background-color: #fff;
  background-image: url('https://safeean.club/wordpress/btp/kidsbutton2.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}


.bd8-current-menu-box{
  margin:20px 0 24px;
  padding:22px;
  border-radius:20px;
  background:linear-gradient(135deg,#f8fbff 0%,#eef5ff 100%);
  border:1px solid #d7e5ff;
  box-shadow:0 8px 24px rgba(25,85,180,0.08);
}

.bd8-current-menu-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
}

.bd8-current-menu-head strong{
  font-size:20px;
  font-weight:800;
  color:#16325c;
}

.bd8-current-menu-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:28px;
  padding:0 12px;
  border-radius:999px;
  background:#0f5cc0;
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
}

#bd8-current-menu-text{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

#bd8-current-menu-text .bd8-pill{
  padding:10px 16px;
  border-radius:999px;
  background:#fff;
  border:1px solid #d9e7ff;
  color:#16325c;
  font-size:14px;
  font-weight:700;
  box-shadow:0 4px 12px rgba(15,92,192,0.08);
}


.bd8-allergy-summary {
  margin: 18px 0;
  padding: 20px;
  border-radius: 14px;
  background: #fff1e8;
  font-size: 17px;
  font-weight: 800;
  color: #3b1f12;
}

.bd8-allergy-summary .danger-text {
  color: #dc2626;
}

.bd8-allergy-summary .safe-text {
  color: #16a34a;
}

.bd8-allergy-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: #fff;
}

.bd8-allergy-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  background: #fff;
}

.bd8-allergy-table th {
  background: #fff1e8;
  color: #ff6b4a;
  font-weight: 800;
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid #f3d6ca;
}

.bd8-allergy-table td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid #f1e2dc;
  color: #172554;
  font-size: 15px;
  vertical-align: middle;
}

.bd8-allergy-table tr.has-conflict {
  background: #fff5f5;
  border-left: 5px solid #dc2626;
}

.bd8-person-cell {
  text-align: left !important;
  min-width: 160px;
}

.bd8-person-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.bd8-person-name {
  font-size: 15px;
  font-weight: 800;
  color: #172554;
}

.bd8-person-meta {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.bd8-recommend-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.4;
}

.bd8-recommend-chip.danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.bd8-recommend-chip.safe {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

@media (max-width: 640px) {
  .bd8-allergy-table {
    min-width: 0;
  }
  .bd8-allergy-table th,
  .bd8-allergy-table td {
    padding: 10px 8px;
    font-size: 13px;
  }
  .bd8-person-name {
    font-size: 14px;
  }
}

.bd8-banner-mobile {
  display: none;
}

@media (max-width: 640px) {
  .bd8-banner-wrap {
    display: none !important;
  }

  .bd8-banner-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto 24px;
    background-image: url('https://safeean.club/wordpress/btp/kidsbutton3.png');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 260px;
  }

  .bd8-banner-mobile-image {
    position: relative;
    flex: 1;
    background: transparent;
    min-height: 210px;
  }

  .bd8-banner-mobile-logo {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 110px;
    height: auto;
  }

  .bd8-banner-mobile-title {
    position: absolute;
    bottom: 18px;
    left: 20px;
    color: #000000;
    font-size: 22px;
    font-weight: 800;
    /* text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); */
    line-height: 1.2;
    letter-spacing: -0.3px;
  }

  .bd8-banner-mobile-steps {
    display: flex;
    align-items: stretch;
    background: #FF531F;
    height: 50px;
    border-radius: 16px 16px 0 0;
    padding: 0;
    position: relative;
  }

  .bd8-mobile-step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    color: #fff;
    line-height: 1;
    user-select: none;
    position: relative;
    transition: none;
  }

  .bd8-mobile-step > * {
    position: relative;
    z-index: 1;
  }

  .bd8-mobile-step-num {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1;
  }

  .bd8-mobile-step-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
  }

  .bd8-mobile-step.active::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 3px;
    bottom: 0;
    left: 3px;
    background: #fff;
    border-radius: 14px 14px 0 0;
    z-index: 0;
  }

  .bd8-mobile-step.active .bd8-mobile-step-num {
    color: #FF531F;
    font-size: 20px;
    font-weight: 800;
  }

  .bd8-mobile-step.active .bd8-mobile-step-label {
    color: #FF531F;
    font-size: 13px;
    font-weight: 600;
  }
}

.bd8-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  margin: 2px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.bd8-pill.danger {
  background: #ffe1dc;
  color: #dc2626;
}

.bd8-none {
  color: #9ca3af;
  font-weight: 600;
}

.bd8-safe-text {
  color: #16a34a;
  font-weight: 800;
}

.bd8-ai-replace-box {
  margin-top: 28px;
  padding: 22px;
  border-radius: 16px;
  background: #eefaf4;
  border-left: 5px solid #22c55e;
}

.bd8-ai-replace-box h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #065f46;
}

.bd8-ai-replace-box p {
  margin: 0 0 16px;
  color: #374151;
}

.bd8-ai-replace-box ul {
  margin: 0;
  padding-left: 20px;
}

.bd8-ai-replace-box li {
  margin-bottom: 8px;
  color: #064e3b;
  line-height: 1.6;
}

.bd8-button-container{
  display : flex;
  flex-direction: row-reverse;
}

#bd8-modal-print{
  background-color : #ff6b4a;
}



/*css 추가 내용 20260512*/

.bd8-simple-replace-list{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.bd8-simple-replace-row{
  display:grid;
  grid-template-columns:82px 1fr;
  align-items:center;
  gap:14px;
  padding:14px 18px;
  border-radius:18px;
  background:#fff;
  border:1px solid #e5e7eb;
  box-shadow:0 4px 14px rgba(0,0,0,0.04);
}

.bd8-simple-type{
  font-size:18px;
  font-weight:900;
  color:#064e3b;
}

.bd8-simple-main{
  display:grid;
  grid-template-columns:1fr 34px 1fr;
  align-items:center;
  gap:10px;
}

.bd8-simple-block{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  min-height:44px;
}

.bd8-simple-label{
  font-size:12px !important;
  font-weight:900 !important;
  color:#6b7280 !important;
  background:transparent !important;
  border:none !important;
  padding:0 !important;
  margin-right:4px;
}

.bd8-simple-block span:not(.bd8-simple-label){
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 11px;
  border-radius:999px;
  background:#f3f4f6;
  border:1px solid #e5e7eb;
  font-size:13px;
  font-weight:800;
  color:#111827;
}

.bd8-simple-block.danger span:not(.bd8-simple-label){
  background:#fff7f7;
  border-color:#fecaca;
}

.bd8-simple-block.safe span:not(.bd8-simple-label){
  background:#ecfdf5;
  border-color:#bbf7d0;
  color:#047857;
}

.bd8-simple-arrow{
  text-align:center;
  font-size:24px;
  font-weight:900;
  color:#22c55e;
}

.bd8-simple-replace-row.milk{border-left:5px solid #fff;}
.bd8-simple-replace-row.egg{border-left:5px solid #fff;}
.bd8-simple-replace-row.bean{border-left:5px solid #fff;}
.bd8-simple-replace-row.shrimp{border-left:5px solid #fff;}
.bd8-simple-replace-row.wheat{border-left:5px solid #fff;}

@media(max-width:640px){
  .bd8-simple-replace-row{
    grid-template-columns:1fr;
    gap:6px;
    padding:14px 16px;
  }

  .bd8-simple-type{
    font-size:16px;
    padding-bottom:10px;
    border-bottom:1px solid #f1f5f9;
    margin-bottom:2px;
  }

  .bd8-simple-main{
    grid-template-columns:1fr;
    gap:6px;
  }

  .bd8-simple-arrow{
    display:none;
  }

  .bd8-simple-block{
    min-height:0;
    padding:4px 0;
    gap:6px;
  }

  .bd8-simple-block .bd8-simple-label{
    flex:0 0 auto;
    min-width:54px;
    font-size:13px !important;
    font-weight:800 !important;
    margin-right:4px !important;
  }

  .bd8-simple-block.danger .bd8-simple-label{
    color:#b91c1c !important;
  }

  .bd8-simple-block.safe .bd8-simple-label{
    color:#15803d !important;
  }
}

/*카메라 클릭 관련*/

.blockchain-demo8-info-box-img-box,
.blockchain-demo8-info-box-img{
  cursor:pointer;
}


/*흰박스 input 정렬 */
.bd8-p-row-2,
.bd8-p-row-3{
  display:grid !important;
  grid-template-columns:repeat(3, 1fr) !important;
  gap:12px 24px !important;
  margin-bottom:12px !important;
}

.bd8-p-row-2 .bd8-field,
.bd8-p-row-3 .bd8-field{
  display:grid !important;
  grid-template-columns:48px minmax(0, 1fr) !important;
  align-items:center !important;
  justify-content:stretch !important;
  gap:8px !important;
  min-width:0 !important;
}

.bd8-p-row-2 .bd8-field label,
.bd8-p-row-3 .bd8-field label{
  width:48px !important;
  margin:0 !important;
  font-size:13px !important;
  font-weight:800 !important;
  color:#111827 !important;
  white-space:nowrap !important;
  text-align:left !important;
}

.bd8-p-row-2 .bd8-field input,
.bd8-p-row-3 .bd8-field input{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  height:38px !important;
  box-sizing:border-box !important;
  border-radius:6px !important;
  text-align:center !important;
}

@media (max-width: 640px) {
  .bd8-p-row-2,
  .bd8-p-row-3{
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .bd8-p-row-2 .bd8-field,
  .bd8-p-row-3 .bd8-field{
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }
  .bd8-p-row-2 .bd8-field input,
  .bd8-p-row-3 .bd8-field input{
    text-align: left !important;
    padding: 0 10px !important;
  }
}


/*데이터 저장 부분*/
#bd8-submit{
  display:none;
}


/*css 추가*/


.bd8-origin-modal{
  position:fixed;
  inset:0;
  z-index:100001;
  display:none;
  align-items:flex-end;
  justify-content:center;
}

.bd8-origin-modal.active{
  display:flex;
}

.bd8-origin-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(30,20,16,.6);
}

.bd8-origin-modal-body{
  position:relative;
  z-index:1;
  width:100%;
  max-width:480px;
  max-height:90vh;
  overflow-y:auto;
  background:#fff;
  border-radius:24px 24px 0 0;
  padding-bottom:32px;
  animation:bd8OriginSlideUp .28s ease;
}

@keyframes bd8OriginSlideUp{
  from{transform:translateY(80px);opacity:0;}
  to{transform:translateY(0);opacity:1;}
}

.bd8-origin-sheet-drag{
  width:36px;
  height:4px;
  background:#e0d8d4;
  border-radius:99px;
  margin:10px auto 0;
}

.bd8-origin-sheet-header{
  padding:14px 16px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.bd8-origin-sheet-title{
  font-size:17px;
  font-weight:900;
  color:#111827;
}

.bd8-origin-sheet-sub{
  margin-top:4px;
  font-size:12px;
  color:#9ca3af;
}

.bd8-origin-sheet-close{
  width:34px;
  height:34px;
  border:none;
  border-radius:999px;
  background:#f0ebe8;
  color:#5a4f4a;
  font-size:26px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
}

.bd8-origin-ingredient-visual{
  position:relative;
  margin-top:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 34px;
}

.bd8-origin-circle-img{
  width:210px;
  height:210px;
  border-radius:999px;
  overflow:hidden;
  background:#f5f0ec;
  margin:0 auto;
}

.bd8-origin-circle-img img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.bd8-origin-arrow{
  width:34px;
  height:34px;
  border:1px solid #e0d8d4;
  border-radius:999px;
  background:#fff;
  font-size:28px;
  color:#5a4f4a;
  cursor:pointer;
}

.bd8-origin-ingredient-name{
  margin-top:18px;
  text-align:center;
  font-size:18px;
  font-weight:900;
  color:#111827;
}

.bd8-origin-ingredient-desc{
  margin-top:6px;
  text-align:center;
  font-size:12px;
  color:#9ca3af;
}

.bd8-origin-dot{
  width:7px;
  height:7px;
  border-radius:999px;
  background:#c05a3a;
  margin:14px auto 0;
}

.bd8-origin-info-strip{
  margin:16px 16px 0;
  padding:14px 16px;
  border:1px solid #e8e0dc;
  border-radius:14px;
  background:#faf7f5;
  display:grid;
  grid-template-columns:1fr 1fr;
}

.bd8-origin-info-col{
  display:flex;
  flex-direction:column;
  gap:5px;
}

.bd8-origin-info-col + .bd8-origin-info-col{
  border-left:1px solid #e8e0dc;
  padding-left:16px;
}

.bd8-origin-info-col span{
  font-size:11px;
  color:#a89990;
}

.bd8-origin-info-col strong{
  font-size:15px;
  color:#111827;
}

.bd8-origin-mile-badge{
  display:inline-flex;
  width:fit-content;
  padding:4px 8px;
  border-radius:8px;
  background:#fdf0ec;
  color:#a84a2e !important;
  font-size:12px !important;
}

.bd8-origin-info-col small{
  font-size:10px;
  color:#a89990;
}

.bd8-origin-update{
  padding:10px 16px 0;
  text-align:right;
  font-size:10px;
  color:#c0b8b4;
}

.bd8-origin-stage{
  margin-top:22px;
}

.bd8-origin-stage-title{
  padding:0 16px 10px;
  font-size:16px;
  font-weight:900;
  color:#111827;
}

.bd8-origin-stage-img{
  width:calc(100% - 32px);
  height:160px;
  margin:0 16px;
  border-radius:14px;
  overflow:hidden;
  background:#f0ebe8;
  cursor:pointer;
}

.bd8-origin-stage-img img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.bd8-origin-doc-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  padding:10px 16px 0;
  font-size:13px;
  color:#5a4f4a;
}

.bd8-origin-doc-toggle{
  width:42px;
  height:24px;
  border:none;
  border-radius:999px;
  background:#d8d0cc;
  position:relative;
  cursor:pointer;
}

.bd8-origin-doc-toggle::after{
  content:'';
  position:absolute;
  top:3px;
  left:3px;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#fff;
}

.bd8-origin-doc-toggle.on{
  background:#2f7d32;
}

.bd8-origin-doc-toggle.on::after{
  left:21px;
}

.bd8-origin-doc-panel{
  display:none;
  margin:18px 16px 0;
}

.bd8-origin-doc-panel.show{
  display:block;
}

.bd8-doc-slider{
  position:relative;
  width:100%;
  padding:14px 42px 28px !important;
  box-sizing:border-box;
}

.bd8-doc-track-wrap{
  width:100%;
  overflow:hidden;
}

.bd8-doc-track{
  display:flex;
  transition:transform .25s ease;
}

.bd8-doc-slide{
  min-width:100%;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center;
}

.bd8-doc-slide img{
  display:block;
  width:auto !important;
  max-width:86% !important;
  height:auto !important;
  max-height:320px !important;
  object-fit:contain !important;
  margin:0 auto !important;
  background:#fff;
}

.bd8-doc-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  border:none;
  background:transparent;
  color:#111827;
  font-size:44px;
  line-height:1;
  cursor:pointer;
  z-index:2;
}

.bd8-doc-arrow.left{
  left:4px;
}

.bd8-doc-arrow.right{
  right:4px;
}

.bd8-doc-dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  margin-top:14px;
}

.bd8-doc-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  border:1px solid #111827;
  background:#fff;
}

.bd8-doc-dot.active{
  background:#111827;
}

.bd8-doc-empty{
  text-align:center;
  padding:20px;
  font-size:13px;
  color:#9ca3af;
}



/* ================================
   4단계 학부모 안심 급식 리포트
================================ */

.bd8-parent-report {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #edf0f4;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.bd8-parent-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 42px;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
}

.bd8-parent-report-head .blockchain-demo8-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #111827;
}

.bd8-parent-report-head .blockchain-demo8-title::before {
  content: "🛡️";
  font-size: 24px;
}

.bd8-parent-report-head .blockchain-demo8-desc {
  margin: 0;
  max-width: 520px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.75;
  color: #6b7280;
}

.bd8-child-select-card {
  width: auto;
  min-width: 0;
  height: 58px;
  padding: 0 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  flex: 0 0 auto;
}

.bd8-child-avatar {
  width: 34px;
  height: 34px;
  font-size: 20px;
}

.bd8-child-select-card select {
  border: none !important;
  background: transparent !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #111827 !important;
  padding: 0 !important;
  text-align: left !important;
  height: auto !important;
}

.bd8-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 30px 24px 18px;
  background: #fff;
}

.bd8-report-summary-card {
  min-height: 142px;
  padding: 22px 18px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.bd8-report-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex: 0 0 auto;
}

.bd8-report-summary-card.safe .bd8-report-icon {
  background: #eaf7ef;
}

.bd8-report-summary-card.warn .bd8-report-icon {
  background: #fff1e8;
}

.bd8-report-summary-card.origin .bd8-report-icon {
  background: #eaf7ef;
}

.bd8-report-summary-card.favorite .bd8-report-icon {
  background: #ffecef;
}

.bd8-report-summary-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.bd8-report-summary-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #111827;
}

.bd8-report-summary-card.warn strong,
.bd8-report-summary-card.favorite strong {
  color: #ff5a2f;
}

.bd8-report-summary-card.origin strong {
  color: #16a34a;
}

.bd8-report-summary-card p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.bd8-report-main-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 22px;
  padding: 18px 24px;
  background: #fff;
}

.bd8-report-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 0.92fr 0.98fr;
  gap: 22px;
  padding: 4px 24px 30px;
  background: #fff;
}

.bd8-report-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.bd8-report-panel h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #111827;
}

.bd8-report-panel > p {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  color: #6b7280;
}

.bd8-report-safe-box {
  min-height: 118px;
  padding: 22px;
  border: 1px solid #ccebd8;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3fff8 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.bd8-report-check {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #dff7e8;
  color: #27ae60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 900;
  flex: 0 0 auto;
}

.bd8-report-safe-box strong,
.bd8-report-notice-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 900;
  color: #15803d;
}

.bd8-report-safe-box span,
.bd8-report-notice-box span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  color: #374151;
}

.bd8-report-notice-box {
  margin-top: 28px;
  padding: 20px;
  border-radius: 14px;
  background: #fafafa;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.bd8-report-light {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff6d8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bd8-report-small-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #f1cdbf;
  border-radius: 8px;
  background: #fff;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.bd8-home-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.bd8-home-guide-card {
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #edf0f4;
  min-height: 126px;
}

.bd8-home-guide-card h4 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 900;
  color: #111827;
}

.bd8-home-guide-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 700;
  color: #4b5563;
}

.bd8-home-guide-card.meal {
  grid-row: span 2;
  background: #fffaf2;
  border-color: #f3e0c5;
}

.bd8-home-guide-card.tip {
  background: #f2fbf4;
  border-color: #d9efdd;
}

.bd8-home-guide-card.fresh {
  background: #f2f8ff;
  border-color: #d7e8ff;
}

.bd8-guide-menu-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #f1e4d2;
}

.bd8-guide-menu-row:first-of-type {
  border-top: none;
}

.bd8-guide-menu-row span {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.bd8-guide-menu-row strong {
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.bd8-guide-menu-row em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
  white-space: nowrap;
}

.bd8-tip-emoji {
  margin-top: 12px;
  text-align: right;
  font-size: 42px;
}

.bd8-nutrition-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
}

.bd8-nutrition-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
}

.bd8-nutrition-row span {
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.bd8-nutrition-row strong {
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  color: #16a34a;
}

.bd8-bar {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.bd8-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #50b96b;
}

.bd8-bar.yellow i {
  background: #f5b52e;
}

.bd8-bar.orange i {
  background: #ff6b2f;
}

.bd8-bar.blue i {
  background: #55aee8;
}

.bd8-favorite-menu-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.bd8-favorite-menu-list li {
  display: grid;
  grid-template-columns: 28px minmax(92px, 1fr) minmax(70px, 110px) 36px;
  align-items: center;
  gap: 10px;
}

.bd8-favorite-menu-list span {
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: #ffb82e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
}

.bd8-favorite-menu-list li:nth-child(n + 3) span {
  background: #eef0f3;
  color: #111827;
}

.bd8-favorite-menu-list strong {
  font-size: 14px;
  font-weight: 900;
  color: #111827;
  white-space: nowrap;
}

.bd8-favorite-menu-list i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #ff6b2f;
}

.bd8-favorite-menu-list em {
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  color: #6b7280;
  text-align: right;
}

.bd8-ai-summary-panel {
  display: flex;
  flex-direction: column;
}

.bd8-ai-summary-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 22px;
}

.bd8-ai-check-circle {
  width: 104px;
  height: 104px;
  border-radius: 999px;
  border: 8px solid #50b96b;
  color: #50b96b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 62px;
  font-weight: 900;
  flex: 0 0 auto;
}

.bd8-ai-summary-content strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.55;
  color: #16a34a;
}

.bd8-ai-summary-content p {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  color: #111827;
}

.bd8-report-footnote {
  margin: 0;
  padding: 14px 24px 28px;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  background: #fff;
}

/* ================================
   4단계 내용
================================ */

@media (max-width: 900px) {
  .bd8-parent-report-head {
    flex-direction: column;
    align-items: stretch;
    padding: 28px 22px;
  }

  .bd8-child-select-card {
    width: 100%;
    min-width: 0;
  }

  .bd8-report-summary-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px 18px 12px;
  }

  .bd8-report-main-grid,
  .bd8-report-bottom-grid {
    grid-template-columns: 1fr;
    padding-left: 18px;
    padding-right: 18px;
  }

  .bd8-home-guide-grid {
    grid-template-columns: 1fr;
  }

  .bd8-home-guide-card.meal {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .bd8-parent-report {
    border-radius: 14px;
  }

  .bd8-parent-report-head {
    padding: 24px 18px;
  }

  .bd8-parent-report-head .blockchain-demo8-title {
    font-size: 23px;
  }

  .bd8-parent-report-head .blockchain-demo8-desc {
    font-size: 13px;
  }

  .bd8-report-summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bd8-report-summary-card {
    min-height: auto;
    padding: 18px;
  }

  .bd8-report-summary-card strong {
    font-size: 30px;
  }

  .bd8-report-panel {
    padding: 20px 18px;
  }

  .bd8-report-notice-box {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .bd8-report-small-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .bd8-nutrition-row {
    grid-template-columns: 64px minmax(0, 1fr) 42px;
  }

  .bd8-favorite-menu-list li {
    grid-template-columns: 28px minmax(80px, 1fr) 70px 34px;
  }

  .bd8-ai-summary-content {
    flex-direction: column;
    text-align: center;
  }

  .bd8-ai-check-circle {
    width: 92px;
    height: 92px;
    font-size: 54px;
  }
}


/* 4단계 - 이번 주 주요 급식 정보 */

.bd8-week-meal-section {
  margin: 18px 24px;
  padding: 24px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.bd8-week-meal-head {
  margin-bottom: 18px;
}

.bd8-week-meal-head h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.04em;
}

.bd8-week-meal-head p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.bd8-week-meal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.bd8-week-meal-card {
  padding: 14px;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.bd8-week-meal-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.bd8-week-meal-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
  color: #111827;
  min-height: 20px;
}

.bd8-week-meal-card img {
  display: block;
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  background: #f3f4f6;
}

.bd8-week-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.bd8-week-tags em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.bd8-week-tags em.safe,
.bd8-week-tags em.ai {
  background: #eaf7ef;
  color: #15803d;
  border: 1px solid #ccebd8;
}

.bd8-week-tags em.warn {
  background: #fff7e6;
  color: #d97706;
  border: 1px solid #fed7aa;
}

.bd8-week-calendar-btn {
  width: 100%;
  height: 44px;
  margin-top: 18px;
  border: 1px solid #ffb199;
  border-radius: 8px;
  background: #fff;
  color: #ff5a2f;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 900px) {
  .bd8-week-meal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bd8-week-meal-section {
    margin-left: 18px;
    margin-right: 18px;
  }
}

@media (max-width: 640px) {
  .bd8-week-meal-grid {
    grid-template-columns: 1fr;
  }

  .bd8-week-meal-card img {
    height: 130px;
  }
}


/* 4단계 리포트 화면 폭 확장 */
.blockchain-demo8-wrap {
  max-width: 1080px !important;
}

.bd8-banner-wrap {
  max-width: 1080px !important;
}

.bd8-banner-mobile {
  max-width: 1080px !important;
}

/* 4단계 카드 압축 개선 */
.bd8-report-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.bd8-report-summary-card {
  padding: 20px 14px !important;
  gap: 12px !important;
}

.bd8-report-summary-card strong {
  font-size: 30px !important;
}

.bd8-report-icon {
  width: 54px !important;
  height: 54px !important;
  font-size: 25px !important;
}

/* 이번 주 급식 카드 개선 */
.bd8-week-meal-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.bd8-week-meal-card {
  min-width: 0 !important;
}

.bd8-week-meal-card img {
  height: 92px !important;
}

/* 중간 2단 레이아웃 비율 개선 */
.bd8-report-main-grid {
  grid-template-columns: 0.85fr 1.25fr !important;
}

.bd8-home-guide-grid {
  grid-template-columns: 1fr 1fr !important;
}

/* 알레르기 정보 카드 줄바꿈 깨짐 방지 */
.bd8-report-notice-box {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
}

.bd8-report-notice-box strong,
.bd8-report-notice-box span {
  word-break: keep-all !important;
}

/* 추천 식단 줄바꿈 개선 */
.bd8-guide-menu-row {
  grid-template-columns: 38px minmax(0, 1fr) 70px !important;
}

.bd8-guide-menu-row strong,
.bd8-guide-menu-row em {
  word-break: keep-all !important;
}

/* 900px 이하에서는 2열 */
@media (max-width: 900px) {
  .blockchain-demo8-wrap,
  .bd8-banner-wrap,
  .bd8-banner-mobile {
    max-width: 100% !important;
  }

  .bd8-report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .bd8-week-meal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .bd8-report-main-grid,
  .bd8-report-bottom-grid,
  .bd8-home-guide-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 모바일에서는 1열 */
@media (max-width: 640px) {
  .bd8-report-summary-grid,
  .bd8-week-meal-grid {
    grid-template-columns: 1fr !important;
  }

  .bd8-week-meal-card img {
    height: 140px !important;
  }

  .bd8-report-notice-box {
    grid-template-columns: 34px minmax(0, 1fr) !important;
  }

  .bd8-report-small-btn {
    grid-column: 1 / -1 !important;
  }
}


.bd8-week-meal-card.has-allergy {
  border-color: #fed7aa !important;
  background: #fffaf4 !important;
}

.bd8-report-safe-box {
  transition: all .2s ease;
}

.bd8-report-summary-card.warn strong {
  color: #ff5a2f !important;
}


/* 4단계 알레르기 시각화 */

.bd8-report-safe-box {
  align-items: flex-start !important;
}

.bd8-allergy-main-icon {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: #e8f7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  flex: 0 0 auto;
}

.bd8-allergy-info-area {
  flex: 1;
  min-width: 0;
}

.bd8-allergy-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.bd8-allergy-title-row strong {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: #15803d !important;
}

.bd8-allergy-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.bd8-allergy-status.safe {
  background: #dcfce7;
  color: #15803d;
}

.bd8-allergy-status.warn {
  background: #fee2e2;
  color: #dc2626;
}

.bd8-allergy-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.bd8-allergy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

.bd8-allergy-chip-icon {
  font-size: 18px;
}

.bd8-allergy-chip-text {
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.bd8-allergy-chip.warn {
  background: #fff5f5;
  border-color: #fecaca;
}

.bd8-allergy-chip.warn .bd8-allergy-chip-text {
  color: #b91c1c;
}

@media (max-width:640px) {

  .bd8-allergy-title-row strong {
    font-size: 17px !important;
  }

  .bd8-allergy-main-icon {
    width: 62px;
    height: 62px;
    font-size: 30px;
  }

  .bd8-allergy-chip {
    width: 100%;
    justify-content: flex-start;
  }

}


.bd8-parent-report-name {
  display: inline-flex;
  align-items: center;

  min-width: 0;
  width: auto;

  font-size: 16px;
  font-weight: 900;
  line-height: 1;

  color: #111827;

  white-space: nowrap;
}


/* 4단계 - 식재료 섭취 다양성 도넛 */

.bd8-diversity-panel {
  min-height: 260px;
}

.bd8-diversity-wrap {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
}

.bd8-diversity-donut {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background:
    conic-gradient(
      #58c878 0deg 259deg,
      #ffe08a 259deg 360deg
    );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bd8-diversity-donut::after {
  content: '';
  position: absolute;
  width: 94px;
  height: 94px;
  border-radius: 999px;
  background: #fff;
}

.bd8-diversity-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.bd8-diversity-center strong {
  display: block;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  color: #111827;
}

.bd8-diversity-center span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 900;
  color: #111827;
}

.bd8-diversity-legend {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.bd8-diversity-legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bd8-diversity-legend-row i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.bd8-diversity-legend-row i.very-good {
  background: #58c878;
}

.bd8-diversity-legend-row i.good {
  background: #9be6a7;
}

.bd8-diversity-legend-row i.normal {
  background: #ffe08a;
}

.bd8-diversity-legend-row i.low {
  background: #ff7b7b;
}

.bd8-diversity-legend-row span {
  font-size: 13px;
  font-weight: 800;
  color: #374151;
}

.bd8-diversity-legend-row strong {
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .bd8-diversity-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }

  .bd8-diversity-legend {
    width: 100%;
  }
}


/* 식재료 섭취 다양성 카드 정렬 보정 */
.bd8-diversity-panel {
  overflow: hidden;
}

.bd8-diversity-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 18px !important;
  margin-top: 18px !important;
}

.bd8-diversity-donut {
  width: 148px !important;
  height: 148px !important;
  flex: 0 0 auto !important;
}

.bd8-diversity-donut::after {
  width: 92px !important;
  height: 92px !important;
}

.bd8-diversity-center strong {
  font-size: 32px !important;
}

.bd8-diversity-center span {
  font-size: 12px !important;
}

.bd8-diversity-legend {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px 14px !important;
}

.bd8-diversity-legend-row {
  display: grid !important;
  grid-template-columns: 10px minmax(0, 1fr) !important;
  gap: 7px !important;
  align-items: center !important;
}

.bd8-diversity-legend-row strong {
  grid-column: 2 / 3 !important;
  font-size: 11px !important;
  color: #9ca3af !important;
}

.bd8-diversity-legend-row span {
  font-size: 12px !important;
  line-height: 1.2 !important;
  word-break: keep-all !important;
}