.paipan-storage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(216, 204, 186, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(248, 242, 231, 0.9));
  box-shadow: 0 10px 24px rgba(21, 31, 27, 0.07);
}

.paipan-storage-status {
  min-width: 0;
  color: var(--muted, #687268);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.paipan-storage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.paipan-storage-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(13, 117, 109, 0.26);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--teal, var(--green, #0d756d));
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(21, 31, 27, 0.06);
}

.paipan-storage-button.primary {
  border-color: transparent;
  background: linear-gradient(180deg, #129484, #0b6f67);
  color: #fffdf8;
}

.paipan-storage-button.ghost {
  border-color: rgba(216, 204, 186, 0.9);
  color: var(--muted, #687268);
}

.paipan-storage-button.danger {
  border-color: rgba(159, 61, 24, 0.28);
  color: #9f3d18;
}

.paipan-storage-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.paipan-storage-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
  padding: 0;
  background: rgba(12, 24, 21, 0.42);
  backdrop-filter: blur(3px);
}

.paipan-storage-dialog {
  position: absolute;
  top: var(--paipan-dialog-top, 18px);
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 100%);
  max-width: calc(100% - 36px);
  max-height: var(--paipan-dialog-max-height, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(216, 204, 186, 0.94);
  border-radius: 10px;
  background: var(--panel, #fffdf8);
  color: var(--ink, #151f1b);
  box-shadow: 0 24px 60px rgba(12, 24, 21, 0.24);
}

.paipan-storage-dialog.large {
  width: min(920px, 100%);
}

.paipan-storage-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line-soft, #e8decd);
}

.paipan-storage-dialog-title {
  margin: 0;
  color: var(--ink, #151f1b);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.25;
}

.paipan-storage-dialog-subtitle {
  margin: 4px 0 0;
  color: var(--muted, #687268);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.paipan-storage-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(216, 204, 186, 0.9);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--muted, #687268);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.paipan-storage-dialog-body {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 16px;
}

.paipan-storage-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line-soft, #e8decd);
}

.paipan-storage-field {
  display: grid;
  gap: 8px;
}

.paipan-storage-label {
  color: var(--muted, #687268);
  font-size: 14px;
  font-weight: 900;
}

.paipan-storage-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  border: 1px solid rgba(216, 204, 186, 0.95);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink, #151f1b);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  padding: 0 12px;
  outline: none;
}

.paipan-storage-input:focus {
  border-color: var(--teal, var(--green, #0d756d));
  box-shadow: 0 0 0 3px rgba(13, 117, 109, 0.14);
}

.paipan-storage-help {
  margin: 10px 0 0;
  color: var(--muted, #687268);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.paipan-storage-empty {
  padding: 24px 12px;
  border: 1px dashed rgba(216, 204, 186, 0.9);
  border-radius: 8px;
  color: var(--muted, #687268);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.paipan-storage-list {
  display: grid;
  gap: 10px;
}

.paipan-storage-record {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(216, 204, 186, 0.88);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(248, 242, 231, 0.72));
}

.paipan-storage-record-title {
  color: var(--ink, #151f1b);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.35;
  word-break: break-word;
}

.paipan-storage-record-meta {
  margin-top: 4px;
  color: var(--muted, #687268);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.paipan-storage-record-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.paipan-storage-snapshot-header {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(216, 204, 186, 0.88);
  border-radius: 8px;
  background: rgba(248, 242, 231, 0.62);
}

.paipan-storage-snapshot-title {
  color: var(--ink, #151f1b);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.35;
  word-break: break-word;
}

.paipan-storage-snapshot-meta {
  margin-top: 4px;
  color: var(--muted, #687268);
  font-size: 12px;
  font-weight: 700;
}

.paipan-storage-snapshot {
  display: grid;
  gap: 12px;
}

.paipan-storage-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10000;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(18, 36, 32, 0.94);
  color: #fffdf8;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(12, 24, 21, 0.24);
}

@media (max-width: 520px) {
  .paipan-storage-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .paipan-storage-actions,
  .paipan-storage-record-actions {
    width: 100%;
  }

  .paipan-storage-button {
    flex: 1;
  }

  .paipan-storage-record {
    grid-template-columns: 1fr;
  }
}
