.history-section {
  padding-block: clamp(50px, 7vw, 96px);
  background: var(--paper);
}
.history-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 6vw, 80px);
  align-items: start;
}
.history-section h2 {
  font-size: var(--t-h2);
  margin-bottom: 12px;
}
.ledger-card,
.desk-card {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 36px);
  min-width: 0;
}
.desk-card {
  border-radius: 22px;
}
.ledger-card {
  --receipt-paper: #fff3e5;
  position: relative;
  border: 0;
  background: var(--receipt-paper);
  filter: drop-shadow(0 2px 3px rgb(70 39 48 / 12%));
}
.ledger-card::before,
.ledger-card::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 8px;
  background: conic-gradient(
      from 315deg at 50% 100%,
      var(--receipt-paper) 0 90deg,
      transparent 90deg
    )
    0 0 / 16px 8px repeat-x;
  pointer-events: none;
}
.ledger-card::before {
  bottom: 100%;
  transform: scaleY(-1);
}
.ledger-card::after {
  top: 100%;
}
.ledger-list {
  padding: 0;
  list-style: none;
}
.ledger-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.ledger-list li:first-child {
  padding-top: 0;
}
.ledger-list li:last-child {
  border-bottom: 0;
}
.ledger-list li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ledger-list time {
  display: block;
  color: var(--muted);
  font-size: 0.87rem;
  margin-top: 3px;
}
.ledger-message {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
  white-space: pre-wrap;
}
.ledger-list b {
  white-space: nowrap;
  color: var(--accent);
}
.ledger-card .btn {
  margin-top: 12px;
}
.ledger-card [hidden] {
  display: none;
}
.desk {
  min-height: 100svh;
  background: var(--bg);
}
.desk-head {
  border-bottom: 1px solid var(--line);
}
.desk-head .wrap,
.desk-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.desk-head .wrap {
  min-height: 76px;
}
.desk-main {
  padding-block: clamp(36px, 7vw, 86px);
}
.desk-main h1 {
  font-size: clamp(38px, 5vw, 66px);
  letter-spacing: -0.025em;
}
.desk-main h2 {
  font-size: clamp(24px, 3vw, 34px);
}
.desk-card {
  background: var(--paper);
}
.desk-card > p {
  margin-top: 12px;
  color: var(--muted);
}
.desk-card form {
  display: grid;
  gap: 19px;
  margin-top: 24px;
}
.desk-card label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.desk-card input:not([type="hidden"]) {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #ae8e94;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.desk-card .ledger-list {
  margin-top: 22px;
}
.ledger-actions {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
}
.login-card {
  max-width: 430px;
  margin-inline: auto;
}
.login-card > img {
  margin-bottom: 20px;
}
.desk-title {
  margin-bottom: 28px;
}
.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}
.desk-home {
  text-decoration: underline;
  text-underline-offset: 2px;
  padding-block: 10px;
}
.desk-error,
.desk-notice {
  padding: 12px 15px;
  border-radius: 10px;
  margin-block: 16px;
  background: var(--pink);
  color: var(--ink);
}
.desk-notice {
  background: #e0efdf;
}
@media (max-width: 700px) {
  .history-inner,
  .desk-grid {
    grid-template-columns: 1fr;
  }
  .desk-head .wrap {
    min-height: 64px;
  }
  .ledger-list li {
    gap: 8px;
  }
}
