@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;700&display=swap');

.rx-paper {
  background: #FEFEFE;
  border: 1px solid #D8D0C4;
  border-radius: 4px;
  padding: 28px 26px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
}

.rx-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 40px;
  font-weight: 900;
  color: rgba(0,0,0,0.035);
  letter-spacing: 5px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.rx-clinic-name {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #1A1A1A;
  letter-spacing: -0.3px;
}

.rx-number {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 10px;
  color: #999;
  margin-top: 3px;
  letter-spacing: 0.3px;
}

.rx-dotline {
  border: none;
  border-top: 1.5px dashed #C8C0B4;
  margin: 14px 0;
}

.rx-patient {
  font-family: 'Noto Sans KR', sans-serif;
}

.rx-field {
  display: flex;
  gap: 0;
  margin-bottom: 5px;
  align-items: flex-start;
  border-bottom: 1px solid #F0EBE3;
  padding-bottom: 5px;
}

.rx-field:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.rx-field-key {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 10px;
  color: #AAA;
  min-width: 52px;
  flex-shrink: 0;
  padding-top: 3px;
  letter-spacing: 1px;
}

.rx-field-val {
  font-size: 13px;
  color: #1A1A1A;
  line-height: 1.55;
  flex: 1;
}

.rx-diagnosis {
  font-weight: 700;
  font-size: 13px;
  color: #C73E3A;
}

.rx-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 12px;
}

.rx-section-line {
  flex: 1;
  height: 1px;
  background: #D8D0C4;
}

.rx-section-label {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 9px;
  color: #AAA;
  letter-spacing: 2px;
  white-space: nowrap;
}

.rx-items {
  font-family: 'Noto Sans KR', sans-serif;
}

.rx-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.rx-item-num {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #1A1A1A;
  min-width: 18px;
  flex-shrink: 0;
  padding-top: 2px;
}

.rx-item-text {
  font-size: 13px;
  font-weight: 700;
  color: #1A1A1A;
  line-height: 1.6;
  display: block;
}

.rx-item-dose {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 10px;
  color: #C73E3A;
  display: block;
  margin-top: 2px;
  line-height: 1.4;
}

.rx-cautions {
  font-family: 'Noto Sans KR', sans-serif;
}

.rx-caution {
  font-size: 11px;
  color: #666;
  line-height: 1.9;
  padding-left: 12px;
  position: relative;
}

.rx-caution::before {
  content: '·';
  position: absolute;
  left: 0;
  color: #C73E3A;
}

.rx-sig {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.rx-sig-text {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 11px;
  color: #666;
}

.rx-stamp-img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
  transform: rotate(-8deg);
  display: block;
}

.btn-rx-save {
  background: #1A1A1A;
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 100%;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: -0.2px;
  transition: opacity 0.15s;
  text-align: center;
  display: block;
}

.btn-rx-save:hover  { opacity: 0.85; }
.btn-rx-save:active { transform: scale(0.98); }
.btn-rx-save:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.rx-btn-row {
  display: flex;
  gap: 10px;
}

.rx-btn-row .btn {
  border-radius: 4px;
}

.rx-share-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  line-height: 1.7;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.rx-share-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

/* ── 미진료 안내 카드 ── */
.rx-nodata-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px 32px;
  box-shadow: var(--shadow);
  display: inline-block;
  width: 100%;
}

.rx-nodata-title {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 16px;
}

.rx-nodata-body {
  font-family: 'Noto Serif KR', 'Georgia', serif;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.9;
}

/* ── 점수 요약 카드 ── */
.rx-score-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.rx-score-label {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.rx-cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.rx-cat-label {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 52px;
  flex-shrink: 0;
}

.rx-cat-bar-wrap {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.rx-cat-bar-fill {
  height: 100%;
  background: var(--brown);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.rx-cat-bar-fill.worst { background: #C73E3A; }

.rx-cat-score {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 26px;
  text-align: right;
}

.rx-cat-score.worst { color: #C73E3A; }

.rx-score-comment {
  font-family: 'Noto Serif KR', 'Georgia', serif;
  font-size: 12px;
  color: var(--text);
  line-height: 1.75;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Toast ── */
.rx-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: #1A1A1A;
  color: #fff;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 4px;
  white-space: nowrap;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

.rx-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
