.postcard-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.postcard-button {
  flex: 1;
  min-width: 0;
  max-width: calc((100% - 36px) / 4); /* 4개 버튼 + 3개 gap(12px each) */
  background-color: #ffffff33;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
}

.postcard-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.postcard-name {
  margin-top: 4px;
  font-weight: bold;
  font-size: 0.8rem;
}

.postcard-price-container {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.85rem;
}

.currency-icon {
  width: 16px;
  height: 16px;
}

.purchase-amounts {
  display: flex;
  gap: 10px;
}

.purchase-amount {
  width: 60px;
  background: #333;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: center;
}

.purchase-amount.selected {
  border: 2px solid gold;
  font-weight: bold;
}


.mailbox-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mailbox-title {
  font-weight: bold;
  color: white;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.mailbox-grid-wrapper {
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
}

.mailbox-grid-wrapper::-webkit-scrollbar {
  display: none;
}

.mailbox-grid {
  background-color: #2b2b2b;
  display: grid;
  grid-template-columns: repeat(auto-fill, 100px);
  gap: 0px;
  height: 240px;
  overflow-y: auto;
  scrollbar-width: none;
}

.mailbox-card {
  position: relative;
  width: 100px;
  height: 100px;
  background-image: url('/static/images/CollectionGame/postcard/slot_background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.mailbox-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background-color: #2b2b2b;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-item img {
  width: 20px;
  height: 20px;
}

.mailbox-card .slot-bg {
  width: 100%;
  height: 100%;
  display: block;
}

.postcard-in-slot {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 80px;
  height: 58px;
  object-fit: cover;
}

.fame-duration {
  position: absolute;
  bottom: 8px;
  left: 2px;
  width: 80%;
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 12px;
  color: white;
  font-weight: bold;
  pointer-events: none;
}

#expand-mailbox {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  background-color: #444;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-item.currency {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.day-progress {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.day-button {
  background: #444;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.black-market-title {
  font-weight: bold;
  color: white;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.black-market-section {
  color:white;
  margin-top: 20px;
  padding-top: 10px;
  margin-bottom: 60px;
  border-top: 1px solid #444;
  font-size: 14px;
}

.black-market-section h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .black-market-section {
    margin-bottom: 240px;
  }
}

.exchange-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.exchange-row label {
  width: 80px;
  font-weight: bold;
  color: #ddd;
}

.exchange-row input[type="number"] {
  background-color: #222;
  border: 1px solid #666;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  width: 120px;
  font-family: inherit;
}

.exchange-row input::placeholder {
  color: #888;
}

.exchange-preview {
  min-width: 120px;
  color: #aaa;
  font-size: 13px;
}

.exchange-row button {
  background-color: #111;
  color: #fff;
  border: 1px solid #999;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.exchange-row button:hover {
  background-color: #333;
}

.exchange-row input {
  width: 100px;
}

.exchange-preview {
  color: gray;
  font-size: 0.9em;
}

.money-icon {
  width: 24px;
  vertical-align: middle;
}

.money-icon-small {
  width: 20px;
  vertical-align: middle;
  margin-right: 4px;
}

.exchange-preview {
  min-width: 120px;
  color: #aaa;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}