.r1-scanner {
  --r1-text: #121a31;
  --r1-border: #ccdaef;
  --r1-soft: #f7fbff;
  --r1-blue: #296fe8;
  --r1-danger: #a62f2f;
  max-width: 760px;
  margin: 2rem auto;
  color: var(--r1-text);
  font-family: inherit;
}
.r1-panel {
  border: 2px solid var(--r1-border);
  background: linear-gradient(180deg, #fff, var(--r1-soft));
  border-radius: 28px;
  padding: clamp(22px, 5vw, 42px);
  box-shadow: 0 18px 45px rgba(20, 50, 90, .08);
}
.r1-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.r1-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 5vw, 2.45rem);
  line-height: 1.1;
}
.r1-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #eef6ff;
  color: var(--r1-blue);
  font-size: 25px;
}
.r1-form {
  display: grid;
  gap: 12px;
}
.r1-form label {
  margin-top: 10px;
  font-size: 1.12rem;
  font-weight: 800;
}
.r1-form label span {
  font-weight: 500;
  color: #65708a;
}
.r1-form input {
  width: 100%;
  box-sizing: border-box;
  min-height: 64px;
  border: 2px solid #b8c8df;
  border-radius: 16px;
  padding: 14px 18px;
  background: #fff;
  color: var(--r1-text);
  font: inherit;
  font-size: 1.05rem;
}
.r1-form input:focus {
  border-color: var(--r1-blue);
  outline: 3px solid rgba(41, 111, 232, .15);
}
.r1-form button {
  min-height: 66px;
  margin-top: 18px;
  border: 0;
  border-radius: 16px;
  background: var(--r1-blue);
  color: #fff;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}
.r1-form button:disabled {
  opacity: .6;
  cursor: wait;
}
.r1-status {
  display: none;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  line-height: 1.45;
}
.r1-status:not(:empty) { display: block; }
.r1-status p { margin: .5rem 0 0; }
.r1-status.is-loading { background: #eef6ff; }
.r1-status.is-success { background: #eaf8ef; }
.r1-status.is-not-found { background: #fff7df; }
.r1-status.is-error { background: #ffeded; color: var(--r1-danger); }
.r1-results {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}
.r1-card {
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr;
  gap: 20px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--r1-border);
  border-radius: 18px;
}
.r1-card-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.r1-no-image {
  display: grid;
  place-items: center;
  aspect-ratio: 2.5 / 3.5;
  background: #eef1f6;
  border-radius: 10px;
  text-align: center;
  padding: 10px;
}
.r1-card-info h3 { margin: 0 0 10px; font-size: 1.4rem; }
.r1-card-info p { margin: 7px 0; }
.r1-price { font-size: 1.1rem; }
.r1-price-note { color: #687289; }
.r1-market-link {
  display: inline-block;
  margin: 8px 0;
  font-weight: 800;
}
.r1-card-info small {
  display: block;
  margin-top: 10px;
  color: #687289;
}
.r1-tips {
  margin: 0;
  padding: 18px 18px 18px 40px;
  background: #fff;
  border: 1px solid var(--r1-border);
  border-radius: 14px;
}
@media (max-width: 590px) {
  .r1-panel { border-radius: 20px; padding: 20px; }
  .r1-card { grid-template-columns: 1fr; }
  .r1-card-image { max-width: 240px; margin: auto; }
}

.r1-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--r1-border);
}
.r1-logo {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 7px 18px rgba(20, 50, 90, .15);
}
.r1-brand-name {
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  font-weight: 900;
  letter-spacing: .12em;
}
.r1-brand-tagline {
  margin-top: 4px;
  color: #65708a;
  font-weight: 700;
}
.r1-photo-section {
  margin-bottom: 14px;
  padding: 18px;
  border: 2px dashed #b8c8df;
  border-radius: 18px;
  background: #fff;
}
.r1-photo-label {
  display: block;
  margin: 0 !important;
}
.r1-photo-help {
  margin: 7px 0 15px;
  color: #65708a;
  line-height: 1.45;
}
.r1-photo-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}
.r1-photo-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  margin: 0 !important;
  padding: 12px 16px;
  border-radius: 14px;
  background: #eef6ff;
  color: #185bbd;
  font-size: 1.05rem !important;
  font-weight: 850 !important;
  text-align: center;
  cursor: pointer;
}
.r1-photo-button:hover {
  background: #e2efff;
}
.r1-photo-preview {
  margin-top: 16px;
  text-align: center;
}
.r1-photo-preview img {
  display: block;
  max-width: min(100%, 340px);
  max-height: 460px;
  margin: 0 auto 12px;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 9px 25px rgba(20, 50, 90, .16);
}
.r1-remove-photo {
  min-height: auto !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  background: #eef1f6 !important;
  color: #30394d !important;
  font-size: .95rem !important;
}
.r1-ocr-status {
  margin-top: 13px;
  line-height: 1.4;
}
.r1-ocr-status.is-working { color: #185bbd; }
.r1-ocr-status.is-success { color: #27743c; }
.r1-ocr-status.is-warning { color: #8a6411; }
@media (max-width: 590px) {
  .r1-logo { width: 68px; height: 68px; }
  .r1-brand { gap: 12px; }
}
