.memo-wrap .memo-unread .title a,
.memo-wrap .memo-unread .memo-accordion-toggle {
  color: #fbbf24;
  font-weight: 700;
}

.memo-wrap .memo-row {
  cursor: default;
}

.memo-wrap .memo-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.memo-wrap .memo-row.is-expanded {
  background: rgba(0, 174, 239, 0.08);
  border-left: 3px solid rgba(0, 174, 239, 0.45);
}

.memo-wrap .memo-row.is-expanded .memo-accordion-toggle {
  color: #5ec8ff;
}

/* 목록 2행 구성 — 1행 메타(수신일·발송자·상태), 2행 제목 */
.memo-table .memo-meta-cell {
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

.memo-table .memo-row-title > .title {
  padding-top: 3px !important;
}

.memo-table .memo-action-cell {
  vertical-align: middle;
  white-space: nowrap;
}

.memo-table thead th:last-child {
  text-align: center;
}

.memo-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: #71717a;
  font-size: 11px;
  line-height: 1.3;
}

.memo-meta-sep {
  color: rgba(255, 255, 255, 0.18);
}

.memo-wrap .memo-unread .memo-status {
  color: #fbbf24;
  font-weight: 700;
}

.memo-wrap .memo-read-btn,
.memo-wrap .memo-delete-btn {
  padding: 4px 10px;
  font-size: 12px;
}

.memo-accordion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.memo-accordion-chevron {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1;
  color: #a1a1aa;
  transition: transform 0.28s ease, color 0.2s ease;
}

.memo-row.is-expanded .memo-accordion-chevron {
  transform: rotate(90deg);
  color: #0099dd;
}

.memo-accordion-title {
  flex: 1 1 auto;
  min-width: 0;
}

.memo-detail-row td {
  padding: 0 !important;
  border-top: none;
}

.memo-detail-row .memo-accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.memo-detail-row.is-open .memo-accordion-panel {
  grid-template-rows: 1fr;
}

.memo-accordion-inner {
  overflow: hidden;
}

.memo-accordion-body {
  padding: 14px 16px 16px 19px;
  color: #94a3b8;
  line-height: 1.75;
  word-break: break-word;
  background: #080c12;
  border-top: 1px solid rgba(0, 174, 239, 0.12);
}

.memo-accordion-body p,
.memo-layer-body p {
  margin: 0 0 0.75em;
  color: inherit;
}

.memo-accordion-body p:last-child,
.memo-layer-body p:last-child {
  margin-bottom: 0;
}

.memo-accordion-body img,
.memo-layer-body img {
  max-width: 100%;
  height: auto;
}

.memo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.memo-layer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.memo-layer.is-open {
  display: flex;
}

.memo-layer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.memo-layer-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: 80vh;
  overflow: auto;
  background: #18181b;
  border: 1px solid rgba(0, 174, 239, 0.35);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.memo-layer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
  border-bottom: 1px solid rgba(0, 174, 239, 0.15);
  background: rgba(0, 174, 239, 0.08);
}

.memo-layer-head h3 {
  margin: 0;
  font-size: 18px;
  color: #0099dd;
}

.memo-layer-close {
  border: none;
  background: transparent;
  color: #a1a1aa;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.memo-layer-meta {
  display: flex;
  gap: 12px;
  padding: 10px 20px 0;
  color: #a1a1aa;
  font-size: 13px;
}

.memo-layer-body {
  margin: 14px 16px 0;
  padding: 16px 18px;
  color: #94a3b8;
  line-height: 1.75;
  word-break: break-word;
  background: #0a1018;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.memo-layer-foot {
  padding: 0 20px 20px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .memo-layer {
    padding: 0;
  }

  .memo-layer-panel {
    width: 90vw;
    max-width: 90vw;
    max-height: 90vh;
  }
}
