.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-button {
  border: 1px solid rgb(190, 218, 218);
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.blockchain-demo8-button.active {
  background: #29a2b3;
  color: #fff;
}

.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-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.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);
  }
}

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

.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-wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 30px;
  background: #fff;
  background-image: url('https://safeean.club/wordpress/btp/kidsbutton2.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

.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-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;
}


/*모달창 내용 수정*/

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

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

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

.bd8-origin-modal-card {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.28);
  z-index: 1;
}

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

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

.bd8-origin-modal-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.bd8-origin-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bd8-origin-modal-section {
  padding: 14px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.bd8-origin-modal-label {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
  color: #6b7280;
}

.bd8-origin-modal-history {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
  color: #111827;
}

.bd8-origin-modal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #047857;
  font-size: 14px;
  font-weight: 900;
}

.bd8-origin-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
}

.bd8-origin-modal-link {
  font-size: 12px;
  color: #2563eb;
  word-break: break-all;
  line-height: 1.5;
}


/*추가 내용*/


.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:88vh;
  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;
}

.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;
}

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


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

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

.bd8-doc-slider{
  position:relative;
  padding:12px 36px 24px;
}

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

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

.bd8-doc-slide{
  min-width:100%;
  text-align:center;
}

.bd8-doc-title{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:220px;
  padding:8px 18px;
  margin-bottom:8px;
  background:#34733a;
  color:#fff;
  font-size:14px;
  font-weight:900;
}

.bd8-doc-slide img{
  width:220px;
  max-width:100%;
  height:auto;
  max-height:300px;
  object-fit:contain;
  background:#fff;
}

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

.bd8-doc-arrow.left{
  left:0;
}

.bd8-doc-arrow.right{
  right:0;
}

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

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

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

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

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

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


.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-title{
  display:none !important;
}

.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;
}