/* 판결문 공유 웹 페이지 스타일. 값은 디자인 원본(Figma「다이몬 공유 NEW」, 2026-11-19 `#court-defendant` 피고 화면 · 도착한 판결문)의 토큰(16:10 Figma 변수값 보정판, 앱 AppColors 와 같은 값) · 판결문 종이를 따름 */
:root {
  /* 기본 색 (디자인 Foundations 01) */
  --ivory: #fcfbf4;
  --cream: #fffdf7;
  --navy: #23243b;
  --cyan: #12a9df;
  --text: #23243b;
  --text-2: #66697d;
  --text-3: #9a99a8;
  --line: #eeeae0;
  /* 배지 색 (디자인 Foundations 02) */
  --info-fg: #12a9df;
  --info-bg: #d9f5ff;
  /* 판결문 위 안내 상자 색 (피고 화면 안내 상자의 지정 색) */
  --notice-bg: #e8f6ff;
  --notice-line: #cfe8f6;
  --error-fg: #d2483c;
  --error-bg: #fdece8;
  --success-fg: #3e8b57;
  --success-bg: #eaf6e3;
  --gray-bg: #efede7;
  --button-gray: #eceae4;
  /* 판결문 종이 */
  --paper: #fbf6ea;
  --paper-line: #e9dfc8;
  --paper-card-line: #eee6d2;
  --court-red: #b44a3a;
  --stamp-red: #c4473a;
  --bar-heavy: #b4473a;
  --bar-light: #e8e3d6;
  --shadow-sm: 0 4px 14px rgba(30, 21, 42, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* 위 막대 (디자인 appbar: 제목 + 1심 배지) */
.top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
}
.top-title { margin: 0; font-size: 16px; font-weight: 700; }

.badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.blue { background: var(--info-bg); color: var(--info-fg); }
.badge.red { background: var(--error-bg); color: var(--error-fg); }
.badge.green { background: var(--success-bg); color: var(--success-fg); }
.badge.gray { background: var(--gray-bg); color: var(--text-2); }

/* 불러오는 중 · 만료 · 오류 */
.state { text-align: center; padding: 64px 8px 24px; }
.state-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.45; }
.state-desc { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.spinner {
  width: 32px; height: 32px; margin: 0 auto 14px;
  border: 3px solid var(--line); border-top-color: var(--court-red);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button.navy { background: var(--navy); color: #fff; }
.button.gray { background: var(--button-gray); color: var(--text-2); }
.state .button { width: auto; height: 44px; margin: 18px auto 0; padding: 0 28px; font-size: 14px; }
.button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* 판결문 종이: 바깥 테두리 + 안쪽 테두리 두 겹 */
.paper {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 12px;
  padding: 6px;
}
.paper-inner {
  position: relative;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 18px 16px;
}

.v-court {
  margin: 0;
  text-align: center;
  color: var(--court-red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
}
.v-title {
  margin: 4px 0 0;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  line-height: 1.3;
}

/* 과실비율 도장 (이중 원 · 기울임) */
.stamp {
  position: absolute;
  top: 50px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 3px double var(--stamp-red);
  border-radius: 50%;
  color: var(--stamp-red);
  text-align: center;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-10deg);
}
.stamp-label { display: block; font-size: 8px; }
.stamp-value { display: block; margin-top: 2px; font-size: 20px; }

/* 사건 정보 (도장 자리만큼 오른쪽을 비움) */
.meta-list { margin-top: 12px; padding-right: 88px; }
.meta { display: flex; align-items: flex-start; padding: 2px 0; font-size: 12px; }
.meta-label { flex: 0 0 64px; color: var(--text-2); }
.meta-value { flex: 1; min-width: 0; }
.meta-value.bold { font-weight: 700; }

.divider { height: 1px; margin: 14px 0; background: var(--line); }

.section-label { margin: 0; color: var(--court-red); font-size: 12px; font-weight: 700; }
.body-text { margin: 8px 0 0; font-size: 13px; line-height: 1.6; white-space: pre-line; }

/* 주문 */
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
}
.order-sub { margin: 0; font-size: 11px; color: var(--text-2); }
.ratio-bar {
  display: flex;
  height: 26px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bar-light);
}
.ratio-part {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ratio-part.light { background: var(--bar-light); color: var(--text-2); }
.ratio-part.heavy { background: var(--bar-heavy); color: #fff; }
.ratio-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
}
.ratio-foot .plain { color: var(--text-2); }
.ratio-foot .heavy-text { color: var(--court-red); font-weight: 700; }

/* 쟁점 · 배심원 의견 카드 */
.paper-card {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--paper-card-line);
  border-radius: 10px;
  background: #fff;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { margin: 0; min-width: 0; font-size: 13px; }
.card-title .number { color: var(--text-3); font-size: 11px; font-weight: 400; }
.card-title b { font-weight: 700; }
.card-text { margin: 8px 0 0; font-size: 12px; line-height: 1.6; }
.card-foot { margin-top: 8px; }

/* 판결문 위 안내 상자 (디자인 피고 화면의 파란 안내) */
.notice {
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid var(--notice-line);
  border-radius: 14px;
  background: var(--notice-bg);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

/* 배심원 의견 한 줄: 다이몬 얼굴 + 의견 */
.juror {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}
.juror-avatar {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.juror-text { margin: 0; min-width: 0; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.juror-name { color: var(--text); font-weight: 700; }

/* 서명 */
.sign { text-align: right; }
.sign-date { margin: 0; font-size: 11px; color: var(--text-2); }
.sign-name { margin: 2px 0 0; font-size: 15px; font-weight: 800; }
.sign-sub { margin: 2px 0 0; font-size: 11px; color: var(--text-3); }

.note { margin: 12px 0; text-align: center; font-size: 11px; color: var(--text-3); }

/* 아래 앱 안내 */
.cta { margin-top: 16px; text-align: center; }
.cta-soon { margin: 0; font-size: 13px; color: var(--text-2); }
