/* Trang Diary Room: dùng thêm check.css cho .check .card .back .note-title .note-text */

.diary { row-gap: 40px; }

.diary .note-title {
  color: #9747FF;
  font-size: clamp(28px, 2.6vw, 37.5px);   /* 50px -> 37.5px */
  line-height: 1;                           /* 100% */
}

/* ============ Card cảm xúc ============ */
.diary-label {
  font-family: "Cabin", sans-serif;
  font-size: 13.5px;                        /* 18px -> 13.5px */
  font-weight: 600;
  line-height: 13.5px;
  color: #20201F;
  text-transform: uppercase;
}

.mood-title {
  margin-top: 20px;
  font-family: "Crimson Pro", serif;
  font-size: clamp(30px, 3.125vw, 45px);   /* 60px -> 45px */
  font-weight: 700;
  line-height: 1.1;                         /* 66px / 60px */
  color: #272727;
}

.mood-sub {
  margin-top: 14px;
  font-family: "Cabin", sans-serif;
  font-size: 18.75px;                       /* 25px -> 18.75px */
  font-weight: 600;
  line-height: 17.25px;
  color: #878787;
}

.moods {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 18px;
  padding: 20px 6px 13px;
  border: 1px solid #272727;
  text-align: center;
}

.mood {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.mood input { position: absolute; opacity: 0; pointer-events: none; }

.mood .face {
  font-family: "Crimson Pro", serif;
  font-size: 33.75px;                       /* 45px -> 33.75px */
  font-weight: 700;
  line-height: 33.75px;
  color: #272727;
}
.mood .name {
  margin-top: 14px;
  font-family: "Crimson Pro", serif;
  font-size: 16.5px;                        /* 22px -> 16.5px */
  font-weight: 500;
  line-height: 15.75px;
  color: #20201F;
}
.mood .dot {
  margin-top: 14px;
  width: 25px;
  height: 25px;
  border: 1.5px solid #272727;
  border-radius: 50%;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.mood:hover .dot { border-color: #6F5BD3; }
.mood input:checked ~ .dot {
  background: #6F5BD3;
  border-color: #6F5BD3;
  box-shadow: inset 0 0 0 4px #fff;
}
.mood input:focus-visible ~ .dot { outline: 2px solid #6F5BD3; outline-offset: 3px; }

/* ============ Card viết nhật ký ============ */
.write-card {
  grid-column: 1 / -1;
  padding: 44px 57px 40px;
  min-height: 541px;
  display: flex;
  flex-direction: column;
}

.write-title {
  max-width: 1020px;
  font-family: "Crimson Pro", serif;
  font-size: clamp(22px, 2.34vw, 33.75px);  /* 45px -> 33.75px */
  font-weight: 700;
  line-height: 1;
  color: #272727;
}

.ghost-btn {
  align-self: flex-start;
  margin-top: 16px;
  padding: 0;
  background: none;
  border: none;
  font-family: "Cabin", sans-serif;
  font-size: 18.75px;                       /* 25px -> 18.75px */
  font-weight: 600;
  line-height: 23px;
  color: #878787;
  cursor: pointer;
  transition: color 0.2s;
}
.ghost-btn:hover { color: #6F5BD3; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumbs:empty { display: none; }
.thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  background: #F5F6EA;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  background: rgba(39, 39, 39, 0.8);
  color: #fff;
  font-size: 15px;
  line-height: 22px;
  cursor: pointer;
}

.diary-text {
  flex: 1;
  width: 100%;
  min-height: 220px;
  margin-top: 10px;
  padding: 0;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: "Cabin", sans-serif;
  font-size: 18.75px;
  font-weight: 600;
  line-height: 1.5;
  color: #272727;
}
.diary-text::placeholder { color: #878787; }

.write-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 20px;
}
.write-status { font-family: "Cabin", sans-serif; font-size: 14px; font-weight: 600; color: #878787; }

.write-note {
  margin-top: 14px;
  max-width: 640px;
  font-family: "Cabin", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: #878787;
}

/* ============ ≤ 1200px ============ */
@media (max-width: 1200px) {
  .write-card { padding: 40px; }
}
/* ============ ≤ 1024px ============ */
@media (max-width: 1024px) {
  .diary { row-gap: 28px; }
  .write-card { min-height: 460px; }
}
/* ============ ≤ 768px ============ */
@media (max-width: 768px) {
  .write-card { padding: 28px 24px; min-height: 400px; }
  .mood .face { font-size: 28px; line-height: 28px; }
}
/* ============ ≤ 480px ============ */
@media (max-width: 480px) {
  .write-card { padding: 24px 18px; min-height: 340px; }
  .moods { padding: 16px 2px 12px; }
  .mood .face { font-size: 22px; line-height: 22px; }
  .mood .name { font-size: 13px; margin-top: 10px; }
  .mood .dot { width: 20px; height: 20px; margin-top: 10px; }
  .thumb { width: 70px; height: 70px; }
  .diary-text { min-height: 160px; }
}