.sheet {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 560px);
  gap: clamp(24px, 5vw, 72px);
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(32px, 7vh, 88px) 24px 64px;
  align-items: start;
}
.masthead { position: sticky; top: 40px; padding-top: 12px; }
.masthead .vert {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0.32em;
  line-height: 1.15;
  border-right: 3px double var(--ink);
  padding-right: 18px;
  height: 11em;
  max-height: 60vh;
  animation: rise 0.6s ease-out both;
}
.masthead .sub { margin-top: 18px; font-size: 0.86rem; color: var(--ink-2); max-width: 12em; }
.seal-mark {
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin-top: 26px;
  border: 3px solid var(--seal);
  border-radius: 4px;
  color: var(--seal);
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1.1;
  text-align: center;
  transform: rotate(-9deg);
  opacity: 0.85;
  animation: stamp 0.5s 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.panel {
  position: relative;
  background: var(--card);
  border: 1.5px solid var(--ink);
  padding: clamp(24px, 4vw, 40px);
  margin-top: 64px;
  box-shadow: 10px 10px 0 var(--paper-2), 10px 10px 0 1.5px var(--line);
  animation: rise 0.6s 0.12s ease-out both;
}
.panel::before {
  content: attr(data-tag);
  position: absolute;
  top: -1.5px;
  right: 24px;
  transform: translateY(-100%);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  padding: 4px 10px;
}
.panel h2 { font-size: 1.5rem; margin-bottom: 6px; }
.panel .lead { margin: 0 0 24px; color: var(--ink-2); }
.form-row { margin-bottom: 18px; }
.last6 { font-family: var(--mono); letter-spacing: 0.35em; font-size: 1.25rem !important; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.actions .btn { min-width: 9em; }
#msg { margin-bottom: 16px; }

.who { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px dashed var(--line); padding-bottom: 14px; }
.who .name { font-family: var(--serif); font-size: 2rem; font-weight: 900; letter-spacing: 0.1em; }
.ticket-card { border: 1.5px solid var(--line); padding: 16px 18px; margin-bottom: 14px; background: #fffdf8; }
.ticket-card dl { display: grid; grid-template-columns: 5.5em 1fr; gap: 4px 12px; margin: 0 0 14px; }
.ticket-card dt { color: var(--ink-2); font-size: 0.9rem; }
.ticket-card dd { margin: 0; font-weight: 600; }
.ticket-card .no { font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.06em; }
.ticket-card .pending { color: var(--ochre); font-weight: 600; }
.viewer { margin-top: 18px; border: 1.5px solid var(--ink); background: #fff; }
.viewer header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.viewer iframe { display: block; width: 100%; height: min(78vh, 900px); border: 0; }
.foot { margin-top: 28px; font-size: 0.82rem; color: var(--ink-2); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-9deg) scale(1.8); } }

@media (max-width: 720px) {
  .sheet { grid-template-columns: 1fr; padding-top: 28px; gap: 8px; }
  .masthead { position: static; display: flex; align-items: center; gap: 16px; }
  .masthead .vert { writing-mode: horizontal-tb; height: auto; border-right: 0; border-bottom: 3px double var(--ink); padding: 0 0 6px; font-size: 2rem; letter-spacing: 0.2em; }
  .masthead .sub { display: none; }
  .seal-mark { width: 58px; height: 58px; font-size: 1rem; margin: 0 0 0 auto; }
  .panel { margin-top: 32px; box-shadow: 6px 6px 0 var(--paper-2); }
}
