/* ---------- 辞令 ---------- */
.jirei {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-doc);
  border: 3px solid #07081a;
  box-shadow: 0 6px 0 #07081a;
  padding: 16px 14px 14px;
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
}
.jirei::before {
  content: ''; position: absolute; inset: 6px; border: 1px solid var(--rule); pointer-events: none;
}
.jirei-h { text-align: center; font-weight: 800; font-size: 22px; letter-spacing: 0.9em; margin: 0 0 0 0.9em; }
.jirei-to { margin: 0; font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.jirei-to span { font-weight: 500; font-size: 12px; color: var(--ink-2); }
.jirei-body { margin: 0; font-size: 14px; line-height: 1.7; }
.lines { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.line {
  display: grid; grid-template-columns: 64px 1fr 58px; gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--rule);
  min-height: 80px;
}
.line .art { width: 64px; height: 64px; position: relative; border: 2px solid var(--ink); box-sizing: content-box; }
.line .art img { width: 64px; height: 64px; }
.line.t-SSR-row .art { border: 3px solid transparent; background: var(--ssr) border-box; margin: -1px; }
.line .txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.line .slot { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: 0.2em; }
.line .val { font-size: 15px; font-weight: 700; line-height: 1.45; }
.line.pending .art img, .line.pending .txt { visibility: hidden; }
.line.pending .art { background: repeating-linear-gradient(45deg, var(--paper-2) 0 4px, transparent 4px 8px); border: 2px dashed var(--rule); margin: 0; }
.line.pop .art img { animation: popin .28s cubic-bezier(.2,1.5,.4,1) 1; }
@keyframes popin { from { transform: scale(.4) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.line.changed { animation: changed 1.6s ease-out 1; }
@keyframes changed { 0% { background: #ffe9a8; } 100% { background: transparent; } }
.stamp {
  justify-self: end;
  font-family: var(--f-disp);
  font-size: 18px; line-height: 1;
  width: 54px; height: 40px;
  display: grid; place-items: center;
  border: 3px solid currentColor;
  border-radius: 6px;
  transform: rotate(-8deg);
  letter-spacing: 0.02em;
  background: rgba(255,255,255,.4);
}
.stamp.t-N { color: var(--n); }
.stamp.t-R { color: var(--r); }
.stamp.t-SR { color: var(--sr); background: #fff6d8; }
.stamp.t-SSR { color: transparent; border-color: transparent; background: linear-gradient(#fffaf0, #fffaf0) padding-box, var(--ssr) border-box; position: relative; }
.stamp.t-SSR span { background: var(--ssr); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stamp.t-TENJO { color: var(--shu); font-size: 15px; }
.stamp.t-UR { color: #f4d06a; background: #14121e; border-color: #f4d06a; box-shadow: 0 0 0 2px #14121e; }
.t-UR { color: #c89a2a; }
.line[data-tier="UR"] .art { border: 3px solid #f4d06a; box-shadow: 0 0 0 2px #14121e; }
.line.pending .stamp { visibility: hidden; }
.line.pop .stamp { animation: stampin .3s cubic-bezier(.3,1.6,.5,1) 1; }
@keyframes stampin { 0% { transform: rotate(-8deg) scale(2.4); opacity: 0; } 70% { transform: rotate(-8deg) scale(.9); opacity: 1; } 100% { transform: rotate(-8deg) scale(1); } }
.jirei-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.hanko {
  width: 38px; height: 38px; border: 3px solid var(--shu); color: var(--shu);
  border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; line-height: 1.05; font-weight: 800; writing-mode: vertical-rl;
  transform: rotate(-6deg); filter: url(#rough);
}
.paper-in { animation: paperin .45s cubic-bezier(.2,1.1,.3,1) 1; }
@keyframes paperin { from { transform: translateY(70%) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.draw-paper { position: absolute; left: 0; right: 0; bottom: 74px; top: 52px; overflow-y: auto; padding: 0 2px 8px; z-index: 6; }
.draw-actions { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 7; }

