/* ── Custom Fonts ── */
@font-face {
  font-family: 'ParkDahyun';
  src: url('/assets/fonts/OngulipParkDahyun.ttf') format('truetype');
}
@font-face {
  font-family: 'ChosunGu';
  src: url('/assets/fonts/ChosunGu.TTF') format('truetype');
}

/* ── Diary Board Skin ── */
body, .jt-main, .jt-content {
  background: #eff4bb !important;
}

.jt-header {
  border-bottom: none !important;
  box-shadow: none !important;
}
.jt-main {
  border-top: none !important;
  box-shadow: none !important;
}

.jt-diary-board {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 36px 80px;
}

.jt-diary-section-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 36px;
}

/* ── 카드 그리드 ── */
.jt-diary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.jt-diary-empty {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.35;
}

.jt-diary-card {
  cursor: pointer;
  background: rgba(255,255,255,0.45);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.jt-diary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.1);
}

.jt-diary-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0,0,0,0.06);
}
.jt-diary-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.jt-diary-card-thumb::after {
  content: '▶';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: rgba(255,255,255,0.85);
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.2s;
}
.jt-diary-card:hover .jt-diary-card-thumb::after { opacity: 1; }
.jt-diary-card:hover .jt-diary-card-thumb img { opacity: 0.85; }

.jt-diary-card-body {
  padding: 16px 18px 18px;
}
.jt-diary-card-date {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  opacity: 0.45;
  margin-bottom: 6px;
}
.jt-diary-card-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: #000;
}

/* ── 글쓰기 버튼 ── */
.jt-diary-write-btn {
  display: block;
  width: fit-content;
  margin: 48px auto 0;
  padding: 12px 32px;
  border: 1px solid #000;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #000;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.jt-diary-write-btn:hover {
  background: #000;
  color: #eff4bb;
}

/* ── 모달 ── */
.jt-diary-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.jt-diary-modal.open { display: flex; }
.jt-diary-modal-inner {
  position: relative;
  width: min(820px, 90vw);
  aspect-ratio: 16 / 9;
}
.jt-diary-modal-inner iframe {
  width: 100%; height: 100%;
  border: none; display: block;
}
.jt-diary-modal-close {
  position: absolute;
  top: -38px; right: 0;
  background: none !important; border: none;
  color: rgba(255,255,255,0.6);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s;
}
.jt-diary-modal-close:hover { color: #fff; }

/* ── 포스트잇 필드 ── */
.jt-diary-board {
  position: relative;
}
.jt-postit-field {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 5;
}

/* ── 포스트잇 공통 ── */
.jt-postit {
  position: absolute;
  width: 300px;
  height: 300px;
  background: #fffde7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
  pointer-events: all;
  filter: drop-shadow(2px 6px 14px rgba(0,0,0,0.16));
  transition: filter 0.2s;
}
.jt-postit:hover {
  filter: drop-shadow(4px 8px 22px rgba(0,0,0,0.26));
}
.jt-postit.shape-star {
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}
.jt-postit.shape-heart {
  clip-path: url(#jt-clip-heart);
}
.jt-postit.shape-clover {
  clip-path: url(#jt-clip-clover);
}
.jt-postit.sticker-type {
  background: transparent;
  clip-path: none;
}
.jt-postit.sticker-type .sticker-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.jt-postit.sticker-plate {
  width: 220px;
  height: 220px;
}

.jt-postit.photo-type {
  background: #ccc;
}
.jt-postit.photo-type img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.jt-postit-inner {
  width: 160px;
  text-align: center;
  pointer-events: none;
  position: relative;
  z-index: 1;
}
.jt-postit-date {
  display: none;
}
.jt-postit-title {
  font-family: 'ChosunGu', sans-serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.4;
  color: #000;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.jt-postit-text-preview {
  font-family: 'ChosunGu', sans-serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.4;
  color: #000;
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── 모달 텍스트 모드 ── */
.jt-diary-modal.mode-text .jt-diary-modal-inner {
  aspect-ratio: unset;
  width: min(480px, 90vw);
  background: #fff;
  padding: 48px 44px;
}
.jt-diary-modal.mode-text .jt-diary-modal-close {
  top: 16px;
  right: 16px;
  color: rgba(0,0,0,0.4);
}
.jt-diary-modal.mode-text .jt-diary-modal-close:hover { color: #000; }
.jt-modal-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #000;
  margin-bottom: 16px;
  line-height: 1.4;
}
.jt-modal-edit-btn {
  display: block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #000;
  opacity: 0.35;
  text-decoration: none;
  text-align: right;
  margin-top: 24px;

  transition: opacity 0.15s;
}
.jt-modal-edit-btn:hover { opacity: 1; }

.jt-modal-body {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 13px;
  line-height: 1.75;
  color: #444;
  white-space: pre-wrap;
}

/* ── 텍스트 카드 ── */
.jt-diary-card--text .jt-diary-card-body {
  padding: 24px 18px;
}
.jt-diary-card-preview {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  line-height: 1.65;
  opacity: 0.6;
  margin-top: 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ── 글쓰기 폼 ── */
.jt-write-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 36px 80px;
}
.jt-write-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.55);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 13px;
  color: #000;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}
.jt-write-textarea:focus { border-color: #000; }
.jt-write-file {
  display: block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  color: #000;
  opacity: 0.7;
  cursor: pointer;
  padding: 8px 0;
}
.jt-write-photo-status {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  opacity: 0.5;
  margin-top: 4px;
}
.jt-write-optional {
  opacity: 0.5;
  font-size: 9px;
  text-transform: none;
  letter-spacing: 0;
}
.jt-write-label {
  display: block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 8px;
  margin-top: 28px;
}
.jt-write-label:first-of-type { margin-top: 0; }
.jt-write-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.55);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 13px;
  color: #000;
  border-radius: 3px;
  outline: none;
  transition: border-color 0.15s;
}
.jt-write-input:focus { border-color: #000; }
.jt-write-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin-top: 36px;
}
.jt-write-cancel {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #000;
  opacity: 0.4;
  text-decoration: none;
  transition: opacity 0.15s;
}
.jt-write-cancel:hover { opacity: 1; }
.jt-write-submit {
  padding: 11px 28px;
  background: #000;
  color: #eff4bb;
  border: none;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
}
.jt-write-submit:hover { opacity: 0.75; }

/* ── 모바일 ── */
@media (max-width: 600px) {
  .jt-diary-board { padding: 36px 20px 60px; }
  .jt-diary-grid { grid-template-columns: 1fr; gap: 20px; }
  .jt-write-wrap { padding: 36px 20px 60px; }
  .jt-postit { width: 180px; height: 180px; }
  .jt-postit.sticker-plate { width: 130px; height: 130px; }
  .jt-postit-inner { width: 100px; }
  .jt-postit-title, .jt-postit-text-preview { font-size: 15px; }
}
