.desk-sec { padding-top: 3.2rem; }
.desk-sec h2 { font-size: 1.45rem; margin-top: 0.35rem; }

.desk-wrap {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.4rem;
  align-items: start;
  margin-top: 1.4rem;
}

.desk-ui {
  position: relative;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 0.85rem;
  min-height: 780px;
  padding-bottom: 10.5rem;
  box-shadow: 0 22px 44px -28px rgba(16, 42, 74, 0.4);
}

.d-card {
  background: #fff;
  border: 1px solid #eceff3;
  border-radius: 0.95rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.7rem;
}
.d-head { position: relative; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.d-head .back { color: #9aa3ad; font-size: 0.72rem; margin-bottom: 0.45rem; }
.d-head h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.d-head .meta { color: #8b95a1; font-size: 0.72rem; line-height: 1.7; }

.d-edit {
  background: #f8ead6;
  border-color: #f0d7b0;
  transition: box-shadow 0.35s;
}
.d-edit.ping { box-shadow: 0 0 0 3px rgba(232, 145, 20, 0.28) inset; }
.d-edit h4, .d-cust h4 { font-size: 0.88rem; margin-bottom: 0.7rem; }

.line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border-radius: 0.65rem;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}
.line .title { flex: 1; font-weight: 700; }
.line .qty {
  width: 2.4rem;
  height: 1.85rem;
  border: 1px solid #e6e9ee;
  border-radius: 0.4rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: #fff;
}
.line .qty.flash, .field.flash { animation: pop 0.35s ease; box-shadow: 0 0 0 3px rgba(232, 145, 20, 0.35); }
.line .price { color: #6b7280; font-size: 0.78rem; }
.line .del { color: #e11d48; font-size: 0.75rem; font-weight: 700; }

.d-edit label {
  display: block;
  font-size: 0.72rem;
  color: #5c6570;
  margin: 0.35rem 0 0.25rem;
  text-align: right;
}
.field {
  background: #fff;
  border-radius: 0.55rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.8rem;
  min-height: 2.2rem;
}
.field.ghost { color: #b0b7c0; }

.sum {
  text-align: left;
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0.75rem 0 0.7rem;
}
.acts { display: flex; justify-content: flex-end; gap: 0.45rem; }
.ghost-btn, .ok, .pay button {
  border: 0;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: default;
}
.ghost-btn { background: #fff; color: var(--navy); border: 1px solid #e6e9ee; }
.ok { background: #111; color: #fff; }
.ok.pulse { animation: pulse 1.2s ease-in-out 2; }

.d-note {
  border: 1px solid #e8c48a;
  background: #fff8ee;
  color: #c47a12;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.7;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  margin-bottom: 0.7rem;
}

.d-cust p { font-size: 0.8rem; color: var(--muted); }
.d-cust strong { color: var(--navy); margin-right: 0.35rem; }

.pay {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 3.85rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--navy);
  color: #fff;
  border-radius: 0.95rem;
  padding: 0.85rem;
  min-height: 6.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.35s ease, visibility 0.35s, transform 0.35s ease;
}
.pay.on {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.pay p { grid-column: 1 / -1; font-weight: 800; font-size: 0.85rem; margin-bottom: 0.15rem; }
.pay button { background: #fff; color: var(--navy); }
.pay button.on {
  background: var(--orange);
  color: #fff;
  animation: pulse 1.3s ease-in-out infinite;
}

.toast {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  display: block;
  margin-top: 0;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  text-align: center;
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
  min-height: 2.7rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.35s ease, visibility 0.35s, transform 0.35s ease;
}
.toast.on {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.slip {
  position: absolute;
  z-index: 5;
  top: 1rem;
  left: 50%;
  width: min(18.2rem, calc(100% - 1.7rem));
  background: #fff8ee;
  color: var(--navy);
  padding: 0.2rem 1rem 0.85rem;
  box-shadow: 0 24px 44px -18px rgba(16, 42, 74, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.4s ease, visibility 0.4s, transform 0.4s ease;
}
.slip.on {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.slip-cut {
  height: 12px;
  margin: 0 -1rem 0.75rem;
  background:
    radial-gradient(circle at 6px 0, #fafbfc 6px, transparent 7px) 0 0 / 12px 12px repeat-x;
}
.slip-cut.bot {
  margin: 0.65rem -1rem -0.85rem;
  transform: scaleY(-1);
}
.slip .shop {
  text-align: center;
  font-weight: 800;
  font-size: 1.08rem;
}
.slip .kind {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.12rem;
}
.slip .no {
  text-align: center;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--orange);
  letter-spacing: 0.06em;
  margin: 0.45rem 0 0.55rem;
}
.slip dl, .slip ul { font-size: 0.78rem; }
.slip dl div, .slip li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  line-height: 1.75;
}
.slip ul {
  list-style: none;
  border-top: 1px dashed #d8c4a4;
  border-bottom: 1px dashed #d8c4a4;
  padding: 0.45rem 0;
  margin: 0.45rem 0;
}
.slip .tot { margin-top: 0.15rem; }
.slip .payd { font-weight: 800; font-size: 0.88rem; margin-top: 0.2rem; }
.slip-bars {
  height: 34px;
  margin: 0.55rem 0 0.35rem;
  background: repeating-linear-gradient(
    90deg,
    #102a4a 0 2px,
    transparent 2px 3.5px,
    #102a4a 3.5px 4.5px,
    transparent 4.5px 8px
  );
}
.slip .bye {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}
#d-print.pulse { animation: pulse 1.2s ease-in-out 2; }

@media (max-width: 760px) {
  .desk-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .desk-ui {
    width: 100%;
    min-height: 0;
    padding: 0.75rem 0.7rem 9.5rem;
  }
  .desk-wrap .story {
    width: 100%;
    max-width: 22rem;
    text-align: right;
    order: 2;
  }
  .line {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .acts {
    flex-wrap: wrap;
    justify-content: center;
  }
  .d-note { border-radius: 0.85rem; }
  .pay {
    grid-template-columns: 1fr;
    left: 0.7rem;
    right: 0.7rem;
  }
}
