/* a_twdiary - 트윗 + 일기 게시판 스킨
   색상·폰트·모서리·버튼·폼은 모두 사이트 전역 테마(default.css.php 의 디자인 설정 :root 변수)를
   그대로 사용합니다. 테마 색을 바꾸면 이 스킨도 같이 바뀝니다.
   사용하는 변수: --accent-color --bg-color --card-bg-color --card-border-color --card-border-radius
   --content-font-family/size/color --title-font-family/color --btn-primary/secondary/accent-*
   --form-bg-color --form-border-color --form-border-radius --form-text-color
   (연한 배경/보조 글자색은 위 변수에서 color-mix 로 계산) */

:root {
  --dy-accent: var(--accent-color, #b5704f);
  --dy-accent-soft: color-mix(in srgb, var(--dy-accent) 16%, transparent);
  --dy-accent-line: color-mix(in srgb, var(--dy-accent) 45%, transparent);
  --dy-text: var(--content-font-color, #3b3530);
  --dy-sub: color-mix(in srgb, var(--dy-text) 58%, transparent);
  --dy-faint: color-mix(in srgb, var(--dy-text) 7%, transparent);
  --dy-card: var(--card-bg-color, #fffdf8);
  --dy-line: var(--card-border-color, #e6ddd0);
  --dy-radius: var(--card-border-radius, 12px);
  --dy-bg: var(--bg-color, #f3eee6);
  --dy-font: var(--content-font-family, 'Pretendard', sans-serif);
  --dy-title-font: var(--title-font-family, var(--content-font-family, serif));
  --dy-title-color: var(--title-font-color, var(--content-font-color, #3b3530));
  --dy-size: var(--content-font-size, 15px);
  --dy-form-bg: var(--form-bg-color, #fff);
  --dy-form-line: var(--form-border-color, #e6ddd0);
  --dy-form-radius: var(--form-border-radius, 8px);
  --dy-form-text: var(--form-text-color, var(--content-font-color, #3b3530));
  --dy-main-bg: var(--btn-accent-bg, var(--accent-color, #b5704f));
  --dy-main-text: var(--btn-accent-text, #fff);
  --dy-main-radius: var(--btn-accent-radius, 10px);
  --dy-sec-bg: var(--btn-secondary-bg, #fff);
  --dy-sec-text: var(--btn-secondary-text, var(--content-font-color, #3b3530));
  --dy-sec-radius: var(--btn-secondary-radius, 10px);
  --dy-pri-bg: var(--btn-primary-bg, var(--content-font-color, #3b3530));
  --dy-pri-text: var(--btn-primary-text, #fff);
  --dy-pri-radius: var(--btn-primary-radius, 10px);
}

html.dy-lock, html.dy-lock body { overflow: hidden !important; }

.dy-wrap, .dy-thread, .dy-panel, .dy-lightbox { font-family: var(--dy-font); color: var(--dy-text); font-size: var(--dy-size); }
.dy-wrap *, .dy-thread *, .dy-panel *, .dy-lightbox * { box-sizing: border-box; }
.dy-wrap a, .dy-thread a { color: inherit; text-decoration: none; }
.dy-wrap button, .dy-thread button, .dy-panel button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; border: none; background: none; }
.dy-wrap, .dy-thread { animation: dy-fade 0.25s ease; }
@keyframes dy-fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dy-wrap, .dy-thread { animation: none; } }

.dy-wrap { max-width: 860px; margin: 0 auto; padding: 60px 16px 0; }
.dy-sp { flex: 1; }
.dy-card, .dy-paper { background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); }
.dy-paper { padding: 34px 40px; }

/* ───────── 공용 폼/버튼 ───────── */
.dy-input, .dy-textarea {
  width: 100%; background: var(--dy-form-bg); color: var(--dy-form-text);
  border: 1px solid var(--dy-form-line); border-radius: var(--dy-form-radius);
  padding: 9px 12px; font-family: inherit; font-size: 0.93em; outline: none;
}
.dy-textarea { resize: vertical; line-height: 1.7; }
.dy-btn-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--dy-main-bg); color: var(--dy-main-text) !important; border-radius: var(--dy-main-radius);
  padding: 10px 24px; font-weight: 600; white-space: nowrap;
}
.dy-btn-main:hover { filter: brightness(1.08); }
.dy-btn-ghost, .dy-btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--dy-sec-bg); color: var(--dy-sec-text) !important; border: 1px solid var(--dy-line);
  border-radius: var(--dy-sec-radius); white-space: nowrap;
}
.dy-btn-ghost { padding: 10px 24px; }
.dy-btn-sm { padding: 7px 13px; font-size: 0.88em; }
.dy-btn-sm:hover, .dy-btn-ghost:hover { border-color: var(--dy-accent); color: var(--dy-accent) !important; }
.dy-btn-sm:disabled { opacity: 0.4; cursor: default; }
.dy-ico {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--dy-sub) !important; font-size: 1.05em; font-weight: 700;
}
.dy-ico:hover { background: var(--dy-accent-soft); color: var(--dy-accent) !important; }
.dy-iconbtn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--dy-card); border: 1px solid var(--dy-line); color: var(--dy-text) !important;
}
.dy-iconbtn:hover { border-color: var(--dy-accent); color: var(--dy-accent) !important; }

/* 분할 버튼(필터 / 공개범위) */
.dy-seg { display: inline-flex; background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: 999px; overflow: hidden; flex-wrap: nowrap; }
.dy-seg > a, .dy-seg > label { padding: 8px 15px; font-size: 0.88em; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; user-select: none; }
.dy-seg > label input { display: none; }
.dy-seg > a.is-on, .dy-seg > label:has(input:checked) { background: var(--dy-pri-bg); color: var(--dy-pri-text) !important; }

/* 기분 선택 */
.dy-mood-pick { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.dy-pick {
  width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--dy-form-bg); border: 1px solid var(--dy-line); cursor: pointer; font-size: 19px; transition: transform 0.15s;
}
.dy-pick:hover { transform: translateY(-2px); }
.dy-pick input { display: none; }
.dy-pick:has(input:checked) { background: var(--dy-accent-soft); border-color: var(--dy-accent); box-shadow: 0 0 0 2px var(--dy-accent-soft); }
.dy-pick.is-none { font-size: 14px; color: var(--dy-sub); }
.dy-mood { display: inline-flex; align-items: center; font-size: 1.15em; line-height: 1; }
.dy-mood-img { width: 1.35em; height: 1.35em; object-fit: contain; vertical-align: middle; border-radius: 4px; }
.dy-pick .dy-mood-img { width: 24px; height: 24px; }

/* 칩 */
.dy-tg {
  display: inline-block; background: var(--dy-accent-soft); color: var(--dy-accent) !important;
  font-size: 0.8em; padding: 2px 10px; border-radius: 999px; margin: 0 4px 4px 0;
}
a.dy-tg:hover { filter: brightness(1.15); }
.dy-vs { color: var(--dy-sub); font-size: 0.82em; margin-left: 2px; }

/* 아바타 */
.dy-avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--dy-accent-soft), var(--dy-accent-line)); color: var(--dy-accent); font-weight: 700;
}
.dy-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dy-avatar-sm { width: 32px; height: 32px; font-size: 0.85em; }

/* ───────── 트윗 입력창 ───────── */
.dy-tweet-form { margin-bottom: 18px; }
.dy-tweet-box { background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); padding: 16px; }
.dy-tweet-top { display: flex; gap: 12px; align-items: flex-start; }
.dy-tweet-text {
  flex: 1; width: 100%; border: none; outline: none; resize: none; background: transparent; color: var(--dy-text);
  font-family: inherit; font-size: 1.1em; line-height: 1.7; min-height: 56px; padding: 6px 0;
}
.dy-tweet-text.dy-boxed { border: 1px solid var(--dy-form-line); border-radius: var(--dy-form-radius); background: var(--dy-form-bg); color: var(--dy-form-text); padding: 12px 14px; }
.dy-tweet-text::placeholder { color: var(--dy-sub); }
.dy-tweet-tags { display: none; margin-top: 10px; }
.dy-tweet-tags.is-open { display: block; }
.dy-tweet-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--dy-line); padding-top: 12px; margin-top: 12px; }
.dy-edit-tools { margin-top: 6px; }

/* 이미지 업로더 (파일 첨부 + 링크) */
.dy-up { margin-top: 12px; }
.dy-up-tiles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dy-up-tiles.is-empty { display: none; }
.dy-up-tile { width: 68px; height: 68px; border-radius: 10px; overflow: hidden; position: relative; border: 1px solid var(--dy-line); background: var(--dy-faint); }
.dy-up-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dy-up-tile em { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 10px; text-align: center; font-style: normal; padding: 1px 0; }
.dy-up-remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff !important; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.dy-up-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dy-up-row .dy-up-link { flex: 1; min-width: 160px; width: auto; }
.dy-up-or { font-size: 0.8em; color: var(--dy-sub); }
.dy-cinput .dy-up-row { display: none; margin-bottom: 8px; }
.dy-cinput .dy-up-row.is-open { display: flex; }
.dy-cinput .dy-up { margin-top: 0; }

/* ───────── 상단 바 / 필터 ───────── */
.dy-topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.dy-search { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 8px; background: var(--dy-form-bg); border: 1px solid var(--dy-form-line); border-radius: 999px; padding: 0 16px; }
.dy-search i { color: var(--dy-sub); }
.dy-search input { flex: 1; border: none; outline: none; background: transparent; color: var(--dy-form-text); padding: 10px 0; font-family: inherit; font-size: 0.93em; }
.dy-active-filter { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.dy-active-filter-clear { font-size: 0.8em; color: var(--dy-sub) !important; margin-left: 4px; }
.dy-month { font-size: 0.85em; color: var(--dy-sub); margin: 22px 0 10px; letter-spacing: 0.05em; }

/* ───────── 트윗 카드 ───────── */
.dy-tw {
  display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); padding: 16px 22px; margin-bottom: 12px;
}
.dy-tw .dy-avatar { grid-column: 1; grid-row: 1 / span 2; }
.dy-tw-hd { grid-column: 2; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin-bottom: 2px; }
.dy-tw-hd b { font-size: 1em; }
.dy-tw-hd span, .dy-tw-date { font-size: 0.86em; color: var(--dy-sub) !important; }
.dy-tw-date:hover { color: var(--dy-accent) !important; }
.dy-tw-tx { grid-column: 2; line-height: 1.75; word-break: break-word; min-width: 0; }
.dy-tw-tx p { margin: 0 0 0.35em; }
.dy-tw-tx p:last-child { margin-bottom: 0; }
.dy-tw-mt { grid-column: 1 / -1; margin-top: 10px; }
.dy-tw-tgs { margin-bottom: 6px; }
.dy-tw-act { display: flex; align-items: center; }
.dy-thr { display: inline-flex; align-items: center; gap: 5px; font-size: 0.86em; color: var(--dy-sub) !important; padding: 4px 8px; margin-left: -8px; border-radius: 14px; }
.dy-thr:hover { background: var(--dy-accent-soft); color: var(--dy-accent) !important; }
.dy-tw-act .dy-mood { margin-left: 4px; }
.dy-locked-msg { color: var(--dy-sub); font-size: 0.92em; }
.dy-locked-msg i { margin-right: 4px; }

/* 이미지 박스: 트윗 카드 가로 전체 (1~4장, 5장 이상은 4칸 + "+N") */
.dy-imgs { grid-column: 1 / -1; display: grid; gap: 4px; margin-top: 10px; border-radius: 12px; overflow: hidden; cursor: pointer; }
.dy-imgs i { display: block; position: relative; background: var(--dy-faint); overflow: hidden; min-height: 0; }
.dy-imgs i img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dy-imgs.n1 { grid-template-columns: 1fr; }
.dy-imgs.n1 i { aspect-ratio: 16 / 10; }
.dy-imgs.n2 { grid-template-columns: 1fr 1fr; }
.dy-imgs.n2 i { aspect-ratio: 1 / 1; }
.dy-imgs.n3, .dy-imgs.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 10; }
.dy-imgs.n3 i:first-child { grid-row: 1 / 3; }
.dy-imgs i[data-more]::after, .dy-cm-imgs i[data-more]::after {
  content: attr(data-more); position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); color: #fff;
  font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ───────── 일기 카드 ───────── */
.dy-entry {
  position: relative; display: grid; grid-template-columns: 70px 1fr 110px; gap: 18px;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); padding: 20px 22px; margin-bottom: 12px; transition: 0.15s;
}
.dy-entry:hover { border-color: var(--dy-accent-line); }
.dy-entry-link { position: absolute; inset: 0; z-index: 1; border-radius: var(--dy-radius); }
.dy-entry-dd { text-align: center; border-right: 1px solid var(--dy-line); padding-right: 14px; }
.dy-entry-dd b { display: block; font-size: 1.9em; font-family: var(--dy-title-font); line-height: 1; }
.dy-entry-dd span { font-size: 0.8em; color: var(--dy-sub); display: block; margin-top: 2px; }
.dy-entry-dd .dy-mood { margin-top: 6px; font-size: 1.3em; display: flex; justify-content: center; }
.dy-entry-body { min-width: 0; }
.dy-entry-body h3 { margin: 0 0 6px; font-size: 1.08em; font-family: var(--dy-title-font); color: var(--dy-title-color); }
.dy-entry-body h3 .dy-vs { font-weight: 400; margin-left: 6px; }
.dy-entry-body p { margin: 0; font-size: 0.92em; color: var(--dy-sub); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dy-entry-meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; position: relative; z-index: 2; }
.dy-entry-meta .dy-tg { position: relative; }
.dy-cmt-count { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82em; color: var(--dy-sub); margin-left: 6px; }
.dy-entry-ph { border-radius: 10px; overflow: hidden; background: var(--dy-faint); }
.dy-entry-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dy-empty { text-align: center; color: var(--dy-sub); padding: 70px 0; }
.dy-empty i { font-size: 2em; display: block; margin-bottom: 10px; }
.dy-paging { display: flex; justify-content: center; gap: 6px; margin-top: 26px; }
.dy-paging a { width: 34px; height: 34px; border-radius: 50%; background: var(--dy-card); border: 1px solid var(--dy-line); display: inline-flex; align-items: center; justify-content: center; font-size: 0.88em; }
.dy-paging a.is-on { background: var(--dy-pri-bg); color: var(--dy-pri-text) !important; border-color: transparent; }

/* ───────── 캘린더 ───────── */
.dy-calbox { padding: 26px 28px; }
.dy-cal-head { display: flex; justify-content: center; align-items: center; gap: 24px; font-size: 1.25em; font-weight: 700; margin-bottom: 18px; }
.dy-cal-head a { color: var(--dy-sub) !important; font-size: 0.7em; padding: 6px 10px; }
.dy-bigcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dy-bigcal > i { font-style: normal; text-align: center; font-size: 0.8em; color: var(--dy-sub); padding-bottom: 4px; }
.dy-cc {
  position: relative; overflow: hidden; min-height: 92px; border: 1px solid var(--dy-line); border-radius: 10px; background: var(--dy-form-bg);
  padding: 8px 10px; display: flex; flex-direction: column; justify-content: space-between; transition: 0.15s;
}
a.dy-cc:hover { border-color: var(--dy-accent); }
.dy-cc-d { position: relative; z-index: 1; font-size: 0.85em; }
.dy-cc.is-mute { background: transparent; border-color: transparent; color: var(--dy-sub); opacity: 0.45; }
.dy-cc.is-today { border-color: var(--dy-accent); box-shadow: 0 0 0 2px var(--dy-accent-soft); }
.dy-cc.is-today .dy-cc-d { color: var(--dy-accent); font-weight: 700; }
.dy-cc-m { font-style: normal; font-size: 1.8em; text-align: center; line-height: 1; position: relative; z-index: 1; display: flex; justify-content: center; }
.dy-cc-m .dy-mood-img { width: 1.1em; height: 1.1em; }
.dy-cc-n { position: absolute; z-index: 1; top: 6px; right: 8px; font-size: 0.72em; color: var(--dy-sub); }
.dy-cc.has-img { border-color: transparent; }
.dy-cc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dy-cc.has-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 55%); z-index: 1; }
.dy-cc.has-img .dy-cc-d, .dy-cc.has-img .dy-cc-n { color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
.dy-cc.has-img .dy-cc-m { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; font-size: 18px; align-items: center; background: rgba(255, 255, 255, 0.9); border-radius: 50%; color: #000; }
.dy-cc.has-img .dy-cc-m .dy-mood-img { width: 20px; height: 20px; }

/* ───────── 풀스크린 멘션 화면 (트윗 상세) ───────── */
.dy-thread {
  position: fixed; inset: 0; z-index: 99999; display: grid; grid-template-columns: 1fr 420px;
  background: var(--dy-bg); animation: none;
}
.dy-thread.no-img { grid-template-columns: 1fr; }
.dy-tl { position: relative; min-width: 0; min-height: 0; background: color-mix(in srgb, var(--dy-bg) 78%, black); }
.dy-tr {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%;
  background: linear-gradient(var(--dy-card), var(--dy-card)), var(--dy-bg); border-left: 1px solid var(--dy-line);
}
.dy-thread.no-img .dy-tr { max-width: 720px; width: 100%; margin: 0 auto; border-right: 1px solid var(--dy-line); }
.dy-th-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; flex: none; }
.dy-who { flex: 1; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.dy-who b { color: var(--dy-accent); font-size: 0.95em; }
.dy-who span { font-size: 0.8em; color: var(--dy-sub); }
.dy-th-body { padding: 4px 18px 14px; border-bottom: 1px solid var(--dy-line); flex: none; max-height: 40%; overflow: auto; }
.dy-th-body .dy-tw-tx { font-size: 1.03em; }
.dy-th-meta { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.dy-th-meta .dy-mood { margin-left: 6px; font-size: 1.2em; }
.dy-thread .dy-cmts { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 18px; }
.dy-thread .dy-cinput { flex: none; border-top: 1px solid var(--dy-line); padding: 12px 18px 14px; background: linear-gradient(var(--dy-card), var(--dy-card)), var(--dy-bg); }

/* 슬라이더 */
.dy-slider { position: relative; width: 100%; height: 100%; }
.dy-slides { position: absolute; inset: 0; }
.dy-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.dy-slide.is-active { opacity: 1; pointer-events: auto; }
/* 트윗 상세: 이미지가 잘리지 않고 전체가 보이도록 (남는 곳은 배경색) */
.dy-tl .dy-slide { object-fit: contain; }
.dy-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.78); color: #222 !important; display: flex; align-items: center; justify-content: center;
}
.dy-slider-arrow:hover { background: #fff; }
.dy-slider-arrow.prev { left: 14px; }
.dy-slider-arrow.next { right: 14px; }
.dy-slider-count { position: absolute; z-index: 2; top: 14px; right: 14px; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.dy-slider-dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dy-slider-dot { pointer-events: auto; width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.55); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: 0.15s; }
.dy-slider-dot.is-active { background: #fff; width: 18px; }

/* ───────── 일기 읽기 화면 ───────── */
.dy-readpaper { position: relative; }
.dy-dateline { display: flex; align-items: baseline; gap: 14px; border-bottom: 2px solid var(--dy-text); padding-bottom: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.dy-dateline .d { font-size: 1.9em; font-weight: 700; font-family: var(--dy-title-font); color: var(--dy-title-color); }
.dy-dateline .w { color: var(--dy-sub); font-size: 0.95em; display: inline-flex; align-items: center; gap: 4px; }
.dy-read-title { font-family: var(--dy-title-font); color: var(--dy-title-color); font-size: 1.6em; margin: 0 0 8px; }
.dy-read-body { line-height: 2; word-break: break-word; min-height: 120px; }
.dy-read-body img { max-width: 100%; height: auto; }
.dy-readpaper .dy-slider { height: auto; aspect-ratio: 16 / 10; margin: 22px 0; border-radius: 12px; overflow: hidden; background: var(--dy-faint); }
.dy-readpaper .dy-slide { object-fit: contain; cursor: pointer; }
.dy-read-tags { margin-top: 12px; }
.dy-closewrap { display: flex; justify-content: center; margin-top: 28px; }
.dy-xbtn { width: 46px; height: 46px; border-radius: 50%; background: var(--dy-card); border: 1px solid var(--dy-line); display: flex; align-items: center; justify-content: center; color: var(--dy-sub) !important; }
.dy-xbtn:hover { border-color: var(--dy-accent); color: var(--dy-accent) !important; }

/* ... 메뉴 */
.dy-menu-wrap { position: relative; flex: none; }
.dy-readpaper > .dy-menu-wrap { position: absolute; top: 20px; right: 22px; z-index: 5; }
.dy-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 110px; background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: 10px; overflow: hidden; z-index: 20; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.dy-menu.is-open { display: block; }
.dy-menu a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 0.9em; white-space: nowrap; }
.dy-menu a:hover { background: var(--dy-accent-soft); }
.dy-menu a.is-danger { color: #e0524f !important; }
.dy-th-head .dy-iconbtn, .dy-readpaper .dy-dots { background: transparent; border-color: transparent; color: var(--dy-sub) !important; width: 36px; height: 36px; }

/* ───────── 멘션(댓글) ───────── */
.dy-cmts-title { font-size: 0.95em; margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid var(--dy-line); }
.dy-cmts-empty { color: var(--dy-sub); font-size: 0.9em; padding: 14px 0; }
.dy-cm { display: flex; gap: 10px; padding: 12px 0; margin-left: calc(var(--dy-depth, 0) * 28px); }
.dy-cb { flex: 1; min-width: 0; }
.dy-ch { display: flex; align-items: center; gap: 8px; }
.dy-ch b { font-size: 0.88em; }
.dy-ch > span { font-size: 0.76em; color: var(--dy-sub); }
.dy-cm-menu { margin-left: auto; }
.dy-mini-dots { width: 26px; height: 26px; border-radius: 50%; color: var(--dy-sub) !important; }
.dy-mini-dots:hover { background: var(--dy-accent-soft); }
.dy-ct { font-size: 0.93em; line-height: 1.65; margin-top: 2px; word-break: break-word; }
.dy-ct p { margin: 0 0 0.3em; }
.dy-reply-btn { font-size: 0.78em; color: var(--dy-sub) !important; margin-top: 4px; }
.dy-reply-btn:hover { color: var(--dy-accent) !important; }
.dy-cm-imgs { display: grid; gap: 4px; margin-top: 8px; max-width: 320px; border-radius: 10px; overflow: hidden; }
.dy-cm-imgs i { display: block; position: relative; aspect-ratio: 1 / 1; background: var(--dy-faint); cursor: pointer; overflow: hidden; }
.dy-cm-imgs i img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dy-cm-imgs.n1 { grid-template-columns: 1fr; }
.dy-cm-imgs.n1 i { aspect-ratio: 4 / 3; }
.dy-cm-imgs.n2, .dy-cm-imgs.n3, .dy-cm-imgs.n4 { grid-template-columns: 1fr 1fr; }

/* 멘션 입력창 */
.dy-readpaper .dy-cinput { border: 1px solid var(--dy-line); border-radius: var(--dy-radius); padding: 12px 14px; margin-top: 14px; }
.dy-cinput-denied { text-align: center; color: var(--dy-sub); font-size: 0.9em; }
.dy-cinput-banner { display: none; align-items: center; justify-content: space-between; background: var(--dy-accent-soft); color: var(--dy-accent); font-size: 0.82em; padding: 6px 12px; border-radius: 8px; margin-bottom: 8px; }
.dy-cinput-banner.is-open { display: flex; }
.dy-cinput-banner button { color: inherit !important; font-size: 0.95em; text-decoration: underline; }
.dy-cinput-guest { display: flex; gap: 8px; margin-bottom: 8px; }
.dy-cinput-text {
  width: 100%; resize: none; min-height: 52px; background: var(--dy-form-bg); color: var(--dy-form-text);
  border: 1px solid var(--dy-form-line); border-radius: 12px; padding: 10px 12px; font-family: inherit; font-size: 0.93em; outline: none; line-height: 1.6;
}
.dy-cinput-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.dy-cinput-foot .dy-btn-main { padding: 8px 20px; }
.dy-ck { display: inline-flex; align-items: center; gap: 5px; font-size: 0.82em; color: var(--dy-sub); cursor: pointer; }

/* ───────── 글쓰기 ───────── */
.dy-writepaper { padding: 34px 40px; }
.dy-date-input { width: auto; }
.dy-field { margin-bottom: 22px; }
.dy-label { display: block; font-size: 0.82em; color: var(--dy-sub); margin-bottom: 8px; }
.dy-label-sub { font-weight: 400; opacity: 0.8; }
.dy-title-in {
  width: 100%; border: none; border-bottom: 1px solid var(--dy-line); background: transparent; outline: none; color: var(--dy-title-color);
  font-family: var(--dy-title-font); font-size: 1.5em; padding: 10px 2px; margin-bottom: 18px;
}
.dy-hint { font-size: 0.8em; color: var(--dy-sub); margin: 8px 0 0; line-height: 1.6; }
.dy-hint code { background: var(--dy-faint); padding: 1px 5px; border-radius: 4px; }
.dy-field-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.dy-field-col { flex: 1; min-width: 240px; }
.dy-actions { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }

/* ───────── 게시판 관리 패널 (관리자) ───────── */
.dy-panel-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 100000; display: none; }
.dy-panel-backdrop.is-open { display: block; }
.dy-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 100001; overflow-y: auto; padding: 22px 22px 40px;
  background: linear-gradient(var(--dy-card), var(--dy-card)), var(--dy-bg); border-left: 1px solid var(--dy-line);
  transform: translateX(100%); transition: transform 0.25s ease; visibility: hidden;
}
.dy-panel.is-open { transform: none; visibility: visible; }
.dy-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 1.05em; }
.dy-panel-hint { font-size: 0.82em; color: var(--dy-sub); line-height: 1.7; margin: 0 0 16px; }
.dy-manage-head, .dy-manage-row { display: grid; grid-template-columns: 34px 1fr 68px 1.4fr 34px; gap: 8px; align-items: center; }
.dy-manage-head { font-size: 0.75em; color: var(--dy-sub); margin-bottom: 6px; }
.dy-manage-row { margin-bottom: 8px; }
.dy-manage-prev { width: 34px; height: 34px; border-radius: 10px; background: var(--dy-faint); display: flex; align-items: center; justify-content: center; font-size: 18px; overflow: hidden; }
.dy-manage-prev .dy-mood-img { width: 24px; height: 24px; }
.dy-manage-lock { color: var(--dy-sub); text-align: center; font-size: 0.8em; }
.dy-manage-del { color: #e0524f !important; width: 34px; height: 34px; border-radius: 50%; }
.dy-manage-del:hover { background: color-mix(in srgb, #e0524f 14%, transparent); }
.dy-panel-actions { display: flex; justify-content: center; margin-top: 24px; }

/* ───────── 이미지 크게 보기 ───────── */
.dy-lightbox { position: fixed; inset: 0; z-index: 100010; background: rgba(0, 0, 0, 0.88); display: none; align-items: center; justify-content: center; }
.dy-lightbox.open { display: flex; }
.dy-lightbox img { max-width: 92vw; max-height: 90vh; object-fit: contain; border-radius: 6px; }
.dy-lightbox-close { position: absolute; top: 16px; right: 22px; color: #fff !important; font-size: 34px; line-height: 1; }
.dy-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #fff !important; }
.dy-lightbox-nav.prev { left: 18px; }
.dy-lightbox-nav.next { right: 18px; }

/* ───────── 임베드 / 링크 카드 / 마크다운 ───────── */
.dy-embed-media { margin: 10px 0; max-width: 100%; }
.dy-embed-media--video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.dy-embed-media--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dy-embed-media--shorts { aspect-ratio: 9 / 16; max-width: 320px; }
.dy-embed-media--tweet { max-width: none; }
.dy-embed-media--tweet .twitter-tweet { margin: 0 !important; }
.dy-embed-media--image img { max-width: 100%; border-radius: 12px; display: block; }
.dy-link-card {
  display: block; margin: 10px 0; max-width: 520px; padding: 12px 16px; border: 1px solid var(--dy-line); border-radius: 12px;
  background: var(--dy-faint); transition: 0.15s;
}
.dy-link-card:hover { border-color: var(--dy-accent); }
.dy-link-card__eyebrow { display: block; font-size: 0.74em; color: var(--dy-sub); margin-bottom: 3px; }
.dy-link-card__title { display: block; font-size: 0.93em; color: var(--dy-text); word-break: break-all; line-height: 1.5; }
.dy-md-link-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--dy-accent-soft); color: var(--dy-accent) !important; border-radius: 999px; padding: 1px 10px; font-size: 0.92em; }
.dy-md-heading { margin: 0.6em 0 0.3em; font-family: var(--dy-title-font); color: var(--dy-title-color); }
.dy-md-quote { margin: 0.5em 0; padding: 4px 14px; border-left: 3px solid var(--dy-accent-line); color: var(--dy-sub); }
.dy-md-quote p { margin: 0; }
.dy-md-list { margin: 0.4em 0; padding-left: 1.4em; }
.dy-md-hr { border: none; border-top: 1px solid var(--dy-line); margin: 0.8em 0; }
.dy-md-spacer { height: 0.5em; }
.dy-wrap code, .dy-thread code { background: var(--dy-faint); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.dy-wrap .ra0-emoticon, .dy-thread .ra0-emoticon { height: 1.7em; width: auto; vertical-align: middle; border-radius: 5px; }
.emoticon-popup, .emoticon-autocomplete { z-index: 2147483000 !important; }

/* ───────── 모바일 ───────── */
@media (max-width: 768px) {
  .dy-wrap { padding: 60px 12px 0; }
  .dy-paper, .dy-writepaper { padding: 22px 16px; }
  .dy-tw { padding: 14px; column-gap: 10px; grid-template-columns: 40px 1fr; }
  .dy-avatar { width: 40px; height: 40px; }
  .dy-entry { grid-template-columns: 52px 1fr; padding: 14px; gap: 12px; }
  .dy-entry-ph { display: none; }
  .dy-entry-dd { padding-right: 10px; }
  .dy-calbox { padding: 16px 10px; }
  .dy-cc { min-height: 58px; padding: 5px 6px; }
  .dy-cc-m { font-size: 1.2em; }
  .dy-cc.has-img .dy-cc-m { width: 22px; height: 22px; font-size: 13px; right: 3px; bottom: 3px; }
  .dy-tweet-foot { gap: 6px; }
  .dy-seg > a, .dy-seg > label { padding: 7px 11px; }
  .dy-thread, .dy-thread.no-img { grid-template-columns: 1fr; grid-template-rows: 38% 1fr; }
  .dy-thread.no-img { grid-template-rows: 1fr; }
  .dy-tr { border-left: none; border-top: 1px solid var(--dy-line); }
  .dy-th-body { max-height: 34%; }
  .dy-manage-head { display: none; }
  .dy-manage-row { grid-template-columns: 34px 1fr 60px 34px; }
  .dy-manage-row .mimg { grid-column: 2 / 4; grid-row: 2; }
  .dy-readpaper > .dy-menu-wrap { top: 12px; right: 12px; }
}

/* 입력폼을 클릭(포커스)해도 테두리·그림자·배경 등 모양이 바뀌지 않도록 고정 (사이트 전역 포커스 스타일도 덮어씀) */
.dy-wrap input:focus, .dy-wrap textarea:focus, .dy-wrap select:focus,
.dy-thread input:focus, .dy-thread textarea:focus,
.dy-panel input:focus, .dy-panel textarea:focus {
  outline: none !important;
  box-shadow: none !important;
}
.dy-search:focus-within { border-color: var(--dy-form-line); box-shadow: none; }

/* ───────── 트윗 카드 ... 메뉴 / 댓글 아이콘 위치 / 멤버 호출 ───────── */
.dy-tw { position: relative; }
.dy-tw-menu { position: absolute; top: 10px; right: 12px; z-index: 5; }
.dy-tw-hd { padding-right: 34px; }
.dy-cmt-count { margin: 0 8px 0 0; }
.dy-wrap .mention, .dy-thread .mention { color: var(--dy-accent); font-weight: 600; }
.dy-mention-menu {
  position: fixed; z-index: 2147483000; display: none; width: 260px; max-height: 240px; overflow-y: auto;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  font-family: var(--dy-font); font-size: 14px; color: var(--dy-text);
}
.dy-mention-menu.is-open { display: block; }
.dy-mention-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; cursor: pointer; }
.dy-mention-item span { font-size: 11px; color: var(--dy-sub); }
.dy-mention-item.is-on, .dy-mention-item:hover { background: var(--dy-accent-soft); }

/* 일기 카드: 태그는 윗줄, 댓글 아이콘은 그 아랫줄 */
.dy-entry-meta { display: block; }
.dy-entry-tgs { margin-bottom: 4px; }
.dy-entry-meta .dy-cmt-count { margin: 0; }

/* ───────── 이미지가 없는 트윗의 멘션창: 풀스크린 대신 모달 ───────── */
.dy-thread.no-img {
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(0, 0, 0, 0.55); cursor: pointer;
}
.dy-thread.no-img .dy-tr {
  cursor: auto; width: 100%; max-width: 640px; height: auto; max-height: min(86vh, 780px);
  border: 1px solid var(--dy-line); border-radius: var(--dy-radius); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  background: linear-gradient(var(--dy-card), var(--dy-card)), var(--dy-bg);
}
.dy-thread.no-img .dy-th-body { max-height: none; overflow: visible; flex: none; }
.dy-thread.no-img .dy-cmts { flex: 0 1 auto; max-height: 40vh; min-height: 60px; }
@media (max-width: 768px) {
  .dy-thread.no-img { padding: 12px; }
  .dy-thread.no-img .dy-tr { max-height: 92vh; border-left: 1px solid var(--dy-line); }
}

/* ───────── 입력폼 클릭(포커스) 시 테두리 색 변화 완전 제거 ─────────
   사이트 전역 CSS 의 input:focus / :focus-visible 테두리 색이 덮어쓰지 못하도록 평상시 색을 그대로 고정 */
.dy-wrap :is(input, textarea, select):is(:focus, :focus-visible, :active),
.dy-thread :is(input, textarea, select):is(:focus, :focus-visible, :active),
.dy-panel :is(input, textarea, select):is(:focus, :focus-visible, :active) {
  outline: none !important;
  box-shadow: none !important;
}
.dy-input:is(:focus, :focus-visible), .dy-textarea:is(:focus, :focus-visible),
.dy-cinput-text:is(:focus, :focus-visible), .dy-tweet-text.dy-boxed:is(:focus, :focus-visible),
.dy-date-input:is(:focus, :focus-visible) {
  border-color: var(--dy-form-line) !important;
}
.dy-title-in:is(:focus, :focus-visible) { border-color: var(--dy-line) !important; }
.dy-tweet-text:not(.dy-boxed):is(:focus, :focus-visible), .dy-search input:is(:focus, :focus-visible) { border: none !important; }
.dy-search, .dy-search:focus-within { border-color: var(--dy-form-line) !important; box-shadow: none !important; }
.dy-text { word-break: break-word; }

/* ───────── 입력폼 클릭 시 테두리 변화 제거 (2차) ─────────
   사이트 전역 규칙  input[type=text]:focus … { border:1px solid var(--primary-color) !important; box-shadow … }
   의 우선순위가 더 높아서 지난번 규칙이 일부 입력칸에서 지지 않았음 → html body 로 우선순위를 높이고
   테두리를 "굵기·모양·색" 통째로 평상시 값으로 되돌림 + 색이 서서히 바뀌는 transition 도 제거 */
html body :is(.dy-wrap, .dy-thread, .dy-panel) :is(input, textarea, select) {
  transition: none !important;
}
html body :is(.dy-wrap, .dy-thread, .dy-panel) :is(input, textarea, select):is(:focus, :focus-visible, :active) {
  outline: none !important;
  box-shadow: none !important;
}
html body .dy-input:is(:focus, :focus-visible, :active),
html body .dy-textarea:is(:focus, :focus-visible, :active),
html body .dy-cinput-text:is(:focus, :focus-visible, :active),
html body .dy-tweet-text.dy-boxed:is(:focus, :focus-visible, :active),
html body .dy-date-input:is(:focus, :focus-visible, :active) {
  border: 1px solid var(--dy-form-line) !important;
}
html body .dy-title-in:is(:focus, :focus-visible, :active) {
  border: none !important;
  border-bottom: 1px solid var(--dy-line) !important;
}
html body .dy-tweet-text:not(.dy-boxed):is(:focus, :focus-visible, :active),
html body .dy-search input:is(:focus, :focus-visible, :active) {
  border: none !important;
}

/* 사이트 공통 글자 꾸미기(markup_text) — 스타일은 사이트 전역 CSS(span.italictext / span.txt-box / .blur-txt)를 그대로 사용 */
.dy-wrap .blur-txt, .dy-thread .blur-txt { cursor: pointer; }

/* ───────── 사진 없는 트윗의 멘션 창: 목록 오른쪽 아래에서 올라오는 창 (PC) ─────────
   목록 바로 오른쪽, 화면 맨 아래에 붙어서 떠 있음. 바깥을 눌러도 닫히지 않고 ✕ 로만 닫힘 */
.dy-float {
  position: fixed; bottom: 0; z-index: 99990; display: none; height: min(480px, 66vh);
  font-family: var(--dy-font); color: var(--dy-text); font-size: var(--dy-size);
}
.dy-float, .dy-float * { box-sizing: border-box; }
.dy-float.is-open { display: block; animation: dy-float-up 0.28s ease; }
@keyframes dy-float-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dy-float.is-open { animation: none; } }
.dy-float .dy-tr {
  height: 100%; display: flex; flex-direction: column; min-height: 0;
  background: linear-gradient(var(--dy-card), var(--dy-card)), var(--dy-bg);
  border: 1px solid var(--dy-line); border-bottom: none; border-radius: var(--dy-radius) var(--dy-radius) 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
}
.dy-float-loading { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--dy-sub); font-size: 0.9em;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-bottom: none; border-radius: var(--dy-radius) var(--dy-radius) 0 0; }
.dy-float a { color: inherit; text-decoration: none; }
.dy-float button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; border: none; background: none; }
.dy-float .dy-th-head { padding: 12px 14px 8px; }
.dy-float .dy-th-body { padding: 2px 14px 10px; max-height: 38%; }
.dy-float .dy-cmts { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px; }
.dy-float .dy-cinput { flex: none; border-top: 1px solid var(--dy-line); padding: 10px 14px 12px; }
.dy-float .dy-cm-imgs { max-width: 100%; }

/* ───────── 이미지 없는 트윗의 개별 페이지: 모바일에서는 모달 대신 전체 페이지 ───────── */
@media (max-width: 768px) {
  .dy-thread.no-img { padding: 0; background: var(--dy-bg); align-items: stretch; cursor: auto; }
  .dy-thread.no-img .dy-tr {
    max-width: none; max-height: none; height: 100%; border: none; border-radius: 0; box-shadow: none;
  }
  .dy-thread.no-img .dy-cmts { flex: 1 1 auto; max-height: none; }
}

/* 떠 있는 멘션 창(.dy-float)에도 같은 입력폼/멘션/코드 스타일 적용 */
.dy-float .mention { color: var(--dy-accent); font-weight: 600; }
.dy-float code { background: var(--dy-faint); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.dy-float .ra0-emoticon { height: 1.7em; width: auto; vertical-align: middle; border-radius: 5px; }
html body .dy-float :is(input, textarea, select) { transition: none !important; }
html body .dy-float :is(input, textarea, select):is(:focus, :focus-visible, :active) { outline: none !important; box-shadow: none !important; }
html body .dy-float .dy-input:is(:focus, :focus-visible, :active),
html body .dy-float .dy-cinput-text:is(:focus, :focus-visible, :active) { border: 1px solid var(--dy-form-line) !important; }

/* ───────── 메뉴: 스크롤 영역 안에서도 잘리지 않게 (위치는 JS가 fixed 로 계산) ───────── */
.dy-menu { z-index: 100020; }

/* ───────── 멘션 창: 내용이 길어지면 일정 길이까지 늘어나다가 스크롤 ─────────
   본문(.dy-th-body)과 멘션 목록(.dy-cmts)이 창의 최대 높이를 나눠 쓰며 각자 스크롤됨 */
.dy-float { height: auto; max-height: min(560px, 80vh); }
.dy-float .dy-tr { height: auto; max-height: min(560px, 80vh); }
.dy-float .dy-th-body { flex: 0 1 auto; max-height: 30vh; overflow-y: auto; min-height: 0; }
.dy-float .dy-cmts { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
.dy-float-loading { height: 140px; }
@media (min-width: 769px) {
  .dy-thread.no-img .dy-tr { height: auto; max-height: min(86vh, 780px); }
  .dy-thread.no-img .dy-th-body { flex: 0 1 auto; max-height: 34vh; overflow-y: auto; min-height: 0; }
  .dy-thread.no-img .dy-cmts { flex: 0 1 auto; max-height: none; min-height: 0; overflow-y: auto; }
}

/* ───────── 멘션 영역이 좁아지지 않게 (멘션 창 / 모달) ─────────
   창이 줄어들어야 할 때는 본문이 먼저 줄어들고(스크롤), 멘션 목록은 최소 높이를 보장 */
.dy-float { max-height: min(660px, 88vh); }
.dy-float .dy-tr { max-height: min(660px, 88vh); }
.dy-float .dy-th-body { flex: 0 3 auto; max-height: 26vh; }
.dy-float .dy-cmts { flex: 1 1 auto; }
.dy-float .dy-cmts:has(.dy-cm) { min-height: min(240px, 34vh); }
@media (min-width: 769px) {
  .dy-thread.no-img .dy-tr { max-height: min(90vh, 860px); }
  .dy-thread.no-img .dy-th-body { flex: 0 3 auto; max-height: 28vh; }
  .dy-thread.no-img .dy-cmts { flex: 1 1 auto; }
  .dy-thread.no-img .dy-cmts:has(.dy-cm) { min-height: min(260px, 36vh); }
}

/* 비회원 이름·비밀번호 입력 */
.dy-guest-row { display: flex; gap: 8px; margin-top: 10px; }
.dy-guest-row .dy-input { flex: 1; min-width: 0; }
.dy-write-wrap .dy-guest-row { margin: 0 0 18px; }
@media (max-width: 480px) { .dy-guest-row { flex-direction: column; } }

/* 비회원 프로필 아이콘 */
.dy-avatar.is-guest { font-size: 1.05em; }
.dy-avatar-sm.is-guest { font-size: 0.85em; }

/* ───────── 이번 수정: 이미지 줄 접기 / 링크 카드 가로 전체 / 공개범위 버튼 모양 ───────── */
/* 트윗 입력창: 이미지 추가 줄은 접어두고 # 옆 이미지 버튼으로 펼침 (미리보기 타일은 항상 보임) */
.dy-tweet-form .dy-up { margin-top: 0; }
.dy-tweet-form .dy-up-tiles:not(.is-empty) { margin-top: 12px; }
.dy-tweet-form .dy-up-row { display: none; margin-top: 12px; }
.dy-tweet-form .dy-up-row.is-open { display: flex; }

/* 링크 카드: 가로 전체 (트윗 카드에서는 프로필 사진 아래까지 이미지 박스처럼 꽉 차게) */
.dy-link-card { max-width: none; width: 100%; }
.dy-tw { --dy-av: 44px; --dy-avgap: 14px; }
.dy-tw .dy-tw-tx .dy-link-card { margin-left: calc(-1 * (var(--dy-av) + var(--dy-avgap))); width: calc(100% + var(--dy-av) + var(--dy-avgap)); }
.dy-th-body .dy-link-card, .dy-ct .dy-link-card, .dy-read-body .dy-link-card { margin-left: 0; width: 100%; }
@media (max-width: 768px) { .dy-tw { --dy-av: 40px; --dy-avgap: 10px; } }

/* 공개범위 버튼: 기분 버튼과 같은 모서리/높이 */
.dy-vis-pick { height: 38px; border-radius: 12px; align-items: stretch; }
.dy-vis-pick > label { padding: 0 14px; align-items: center; }
.dy-tweet-foot .dy-vis-pick { margin-right: 4px; }

/* ───────── 기분 버튼: 네잎클로버 아이콘에 수납 ───────── */
.dy-mood-wrap { position: relative; display: inline-flex; }
.dy-mood-btn { font-size: 1.1em; }
.dy-mood-btn.has-mood { background: var(--dy-accent-soft); font-size: 19px; }
.dy-mood-btn .dy-mood-img { width: 24px; height: 24px; }
.dy-mood-pop {
  display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 30;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: 14px; padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.dy-mood-wrap.is-open .dy-mood-pop { display: block; }
.dy-mood-pop .dy-mood-pick { flex-wrap: nowrap; }
@media (max-width: 480px) { .dy-mood-pop { left: -40px; } }

/* 링크 카드: 프로필 사진 쪽으로 튀어나가지 않고, 본문(.dy-text)과 같은 가로 전체 */
.dy-tw .dy-tw-tx .dy-link-card { margin-left: 0; width: 100%; max-width: none; }

/* ───────── 트윗 입력창의 공개범위: #·이미지·이모티콘 버튼과 같은 작은 아이콘 버튼 ───────── */
.dy-tweet-foot .dy-vis-pick {
  height: auto; background: none; border: none; border-radius: 0; overflow: visible; gap: 2px; margin-right: 0;
}
.dy-tweet-foot .dy-vis-pick > label {
  width: 34px; height: 34px; padding: 0; border-radius: 50%; justify-content: center;
  font-size: 0; color: var(--dy-sub); background: none;
}
.dy-tweet-foot .dy-vis-pick > label i { font-size: 15px; }
.dy-tweet-foot .dy-vis-pick > label:hover { background: var(--dy-accent-soft); color: var(--dy-accent); }
.dy-tweet-foot .dy-vis-pick > label:has(input:checked) { background: var(--dy-accent-soft); color: var(--dy-accent) !important; }

/* 공개범위 아이콘 중앙 정렬: 숨일기자와 아이콘 사이의 간격(gap)이 아이콘을 밀던 문제 + 아이콘마다 폭이 달라 생기던 어긋남 보정 */
.dy-tweet-foot .dy-vis-pick > label { gap: 0; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.dy-tweet-foot .dy-vis-pick > label i { width: 18px; text-align: center; margin: 0; line-height: 1; display: inline-block; }

/* ───────── 트윗 입력창 올리기 버튼: 다른 아이콘 버튼과 같은 색, 글자 대신 circle-check 아이콘 (버튼 크기는 그대로) ───────── */
.dy-tweet-foot .dy-submit-icon {
  background: none; color: var(--dy-sub) !important; box-shadow: none;
  min-width: 93px; height: 42px; padding: 0 24px; border-radius: var(--dy-main-radius);
}
.dy-tweet-foot .dy-submit-icon i { font-size: 20px; line-height: 1; }
.dy-tweet-foot .dy-submit-icon:hover { background: var(--dy-accent-soft); color: var(--dy-accent) !important; filter: none; }

/* 올리기 버튼: 글자색과 배경색을 맞바꿈 → 배경 = 다른 아이콘 버튼의 글자색(보조색), 아이콘 = 카드 배경색 */
.dy-tweet-foot .dy-submit-icon {
  background: color-mix(in srgb, var(--dy-text) 58%, var(--dy-card)); color: var(--dy-card) !important;
}
.dy-tweet-foot .dy-submit-icon:hover { background: var(--dy-accent); color: var(--dy-card) !important; }

/* 공개범위 버튼을 #·이미지·이모티콘(.dy-ico)과 완전히 같은 크기·간격으로 통일 */
.dy-tweet-foot .dy-vis-pick { gap: 8px; align-items: center; height: 34px; }
.dy-tweet-foot .dy-vis-pick > label { width: 34px; height: 34px; min-width: 34px; flex: none; }
.dy-tweet-foot .dy-vis-pick > label i { font-size: 1.05em; width: auto; }
.dy-tweet-foot .dy-mood-btn { font-size: 1.05em; }

/* 아이콘 사라짐 수정: 라벨 글자 크기를 0으로 숨겨 둔 상태라 em 단위가 0이 되었음 → px 로 지정 */
.dy-tweet-foot .dy-vis-pick > label i { font-size: 16px; }

/* ───────── 상단 바 재배치: 검색은 돋보기 아이콘 버튼, 누르면 검색창이 펼쳐짐 ───────── */
.dy-search { flex: none; min-width: 0; width: auto; padding: 0; background: none; gap: 0; align-items: center; display: flex; }
html body .dy-search:not(.is-open) { border: none !important; }
.dy-search i { color: inherit; }
.dy-search > input[type="text"] { display: none; width: 210px; padding: 0 14px 0 4px; height: 38px; }
.dy-search.is-open { background: var(--dy-form-bg); border: 1px solid var(--dy-form-line); border-radius: 999px; }
.dy-search.is-open > input[type="text"] { display: block; }
.dy-search.is-open .dy-search-btn { border-color: transparent; background: transparent; }
@media (max-width: 480px) { .dy-search > input[type="text"] { width: 130px; } }

/* ═════════ 1) 검색: 아이콘 위치는 그대로 두고 검색창이 옆으로 늘어나며 생기는 효과 ═════════ */
.dy-search { transition: background 0.3s ease, border-color 0.3s ease; margin: -1px; }
html body .dy-search:not(.is-open) { border: 1px solid transparent !important; background: transparent; }
.dy-search > input[type="text"] {
  display: block; width: 0; min-width: 0; padding: 0; opacity: 0; pointer-events: none; height: 38px;
  transition: width 0.32s cubic-bezier(.2, .8, .2, 1), padding 0.32s ease, opacity 0.22s ease 0.06s;
}
.dy-search.is-open > input[type="text"] { width: 210px; padding: 0 16px 0 4px; opacity: 1; pointer-events: auto; }
@media (max-width: 480px) { .dy-search.is-open > input[type="text"] { width: 130px; } }

/* ═════════ 2) 상단 바 아이콘 버튼(보기 전환·검색·게시판 관리)이 잘 보이도록 ═════════ */
.dy-topbar .dy-iconbtn {
  background: var(--dy-sec-bg); color: var(--dy-sec-text) !important;
  border: 1px solid color-mix(in srgb, var(--dy-text) 24%, transparent);
}
.dy-topbar .dy-iconbtn i { font-size: 16px; opacity: 1; }
.dy-topbar .dy-iconbtn:hover { border-color: var(--dy-accent); color: var(--dy-accent) !important; }
.dy-topbar .dy-search.is-open .dy-search-btn { border-color: transparent; background: transparent; }

/* ═════════ 3) 트윗 입력창 아래 버튼들: 높이·모양·아이콘 크기 통일 (38px, 모서리 12px) ═════════ */
.dy-tweet-foot { gap: 8px; align-items: center; }
.dy-tweet-foot .dy-ico,
.dy-tweet-foot .dy-mood-btn,
.dy-tweet-foot .dy-vis-pick > label,
.dy-tweet-foot .dy-submit-icon {
  box-sizing: border-box; height: 38px; min-width: 38px; padding: 0; flex: none;
  border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.dy-tweet-foot .dy-ico, .dy-tweet-foot .dy-mood-btn, .dy-tweet-foot .dy-vis-pick > label { width: 38px; }
.dy-tweet-foot .dy-ico { font-size: 16px; }
.dy-tweet-foot .dy-ico i, .dy-tweet-foot .dy-mood-btn i { font-size: 16px; }
.dy-tweet-foot .dy-vis-pick { height: 38px; gap: 8px; }
.dy-tweet-foot .dy-vis-pick > label i { font-size: 16px; }
.dy-tweet-foot .dy-submit-icon { width: 93px; min-width: 93px; }
.dy-tweet-foot .dy-submit-icon i { font-size: 18px; }
.dy-tweet-foot .dy-mood-btn.has-mood { font-size: 19px; }

/* ═════════ 상단 바 통일: 모든 컨트롤을 높이 40px · 알약(원형) 모양 · 같은 글자 크기로 ═════════ */
.dy-topbar { align-items: center; gap: 10px; }
.dy-topbar .dy-iconbtn { width: 40px; height: 40px; border-radius: 999px; padding: 0; flex: none; }
.dy-topbar .dy-seg.dy-filter { height: 40px; border-radius: 999px; align-items: stretch; flex: none; }
.dy-topbar .dy-filter > a { height: 100%; padding: 0 18px; display: inline-flex; align-items: center; font-size: 0.93em; }
.dy-topbar .dy-write-btn { height: 40px; padding: 0 22px; border-radius: 999px; font-size: 0.93em; flex: none; }
.dy-topbar .dy-search { box-sizing: border-box; height: 40px; margin: 0; }
html body .dy-topbar .dy-search:not(.is-open) { border: none !important; }
.dy-topbar .dy-search.is-open { border: 1px solid var(--dy-form-line); }
.dy-topbar .dy-search.is-open .dy-search-btn { width: 38px; height: 38px; }
.dy-topbar .dy-search > input[type="text"] { height: 38px; }

/* ═════════ 상단 바 색 통일 + 필터(아이콘) 전체가 둥근 활성 표시 + 부드럽게 이동하는 효과 ═════════ */
.dy-topbar {
  --dy-ctl-bg: var(--dy-sec-bg);
  --dy-ctl-text: var(--dy-sec-text);
  --dy-ctl-line: color-mix(in srgb, var(--dy-text) 24%, transparent);
}
.dy-topbar .dy-iconbtn,
.dy-topbar .dy-seg.dy-filter,
.dy-topbar .dy-search.is-open {
  background: var(--dy-ctl-bg); color: var(--dy-ctl-text) !important; border: 1px solid var(--dy-ctl-line);
}
.dy-topbar .dy-search.is-open { border: 1px solid var(--dy-ctl-line); }
.dy-topbar .dy-iconbtn i, .dy-topbar .dy-filter > a i { color: var(--dy-ctl-text); }
.dy-topbar .dy-search > input[type="text"] { color: var(--dy-ctl-text); }
.dy-topbar .dy-search.is-open .dy-search-btn { background: transparent; border-color: transparent; }

.dy-topbar .dy-seg.dy-filter { position: relative; padding: 3px; gap: 2px; overflow: visible; box-sizing: border-box; }
.dy-topbar .dy-filter > a {
  position: relative; z-index: 1; height: 100%; padding: 0 16px; border-radius: 999px; font-size: 16px;
  color: var(--dy-ctl-text) !important; background: none; transition: color 0.25s ease;
}
.dy-topbar .dy-filter > a i { font-size: 16px; }
.dy-topbar .dy-filter > a.is-on { background: var(--dy-pri-bg); color: var(--dy-pri-text) !important; }
.dy-topbar .dy-filter > a.is-on i { color: var(--dy-pri-text); }
/* 이동 표시(JS 가 켜지면 항목 배경 대신 이 알약이 부드럽게 미끄러짐) */
.dy-seg-ind {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 999px; background: var(--dy-pri-bg);
  transition: transform 0.3s cubic-bezier(.3, .8, .25, 1), width 0.3s cubic-bezier(.3, .8, .25, 1);
  pointer-events: none;
}
.dy-seg-ind.no-anim { transition: none; }
.dy-topbar .dy-filter.has-ind > a.is-on { background: none; }
@media (prefers-reduced-motion: reduce) { .dy-seg-ind { transition: none; } }

/* ═════════ 이미지 슬라이드 점: 어두운 반투명 바탕 위에 더 크고 선명하게 ═════════ */
.dy-slider-dots {
  left: 50%; right: auto; transform: translateX(-50%); bottom: 16px; gap: 8px;
  padding: 7px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.dy-slider-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); box-shadow: none; }
.dy-slider-dot.is-active { background: #fff; width: 22px; border-radius: 999px; }
.dy-slider-count { background: rgba(0, 0, 0, 0.6); font-size: 13px; padding: 4px 12px; }

/* ═════════ 떠 있는 멘션 창: 사라질 때 아래로 내려감 (다른 멘션으로 바꿀 때 자연스럽게 교체) ═════════ */
.dy-float.is-closing { animation: dy-float-down 0.23s ease forwards; }
@keyframes dy-float-down { from { transform: none; opacity: 1; } to { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dy-float.is-closing { animation: none; } }

/* ═════════ 페이지 전환: 브라우저 지원 시 부드럽게 교차, 나가는 쪽은 살짝 사라짐 ═════════ */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.2s ease both dy-vt-out; }
::view-transition-new(root) { animation: 0.28s ease both dy-vt-in; }
@keyframes dy-vt-out { to { opacity: 0; } }
@keyframes dy-vt-in { from { opacity: 0; } }
.dy-wrap.dy-leaving, .dy-thread.dy-leaving { opacity: 0; transform: translateY(-4px); transition: opacity 0.2s ease, transform 0.2s ease; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .dy-wrap.dy-leaving, .dy-thread.dy-leaving { transition: none; }
}

/* ═════════ 상단 바 아래 간격 줄이기 + 월 표시(2026년 10월)를 작은 알약으로 ═════════
   월 표시 글자가 페이지 배경(어두운 색) 위에서 거의 안 보이면서 빈 공간처럼 넓게 느껴졌음 */
.dy-topbar { margin-bottom: 12px; }
.dy-month {
  display: inline-block; margin: 4px 0 8px; padding: 3px 12px; font-size: 0.8em; letter-spacing: 0.04em;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: 999px; color: var(--dy-sub);
}
.dy-topbar + .dy-month, .dy-active-filter + .dy-month { margin-top: 0; }
.dy-month + .dy-tw, .dy-month + .dy-entry { margin-top: 0; }
.dy-active-filter { margin-bottom: 8px; }

/* ═════════ 헤더 폰트(--header-font-family) 적용: 일기 작성 버튼 · 월 구분 · 트윗 닉네임 ═════════ */
.dy-topbar .dy-write-btn,
.dy-month,
.dy-tw-hd b,
.dy-who b {
  font-family: var(--header-font-family, var(--dy-font));
}

/* 목록의 일기 제목 크기 키움 */
.dy-entry-body h3 { font-size: 1.32em; line-height: 1.35; margin-bottom: 8px; }
@media (max-width: 768px) { .dy-entry-body h3 { font-size: 1.2em; } }

/* ═════════ 월 구분: 크게, 배경·테두리 없이, 헤더 폰트 색 ═════════ */
.dy-month {
  font-size: 1.32em; background: none; border: none; border-radius: 0; padding: 0; letter-spacing: 0;
  color: var(--header-font-color, var(--dy-text)); margin: 6px 0 10px; line-height: 1.3;
}
.dy-topbar + .dy-month, .dy-active-filter + .dy-month { margin-top: 2px; }

/* 일기 작성 버튼 글자 크기 */
.dy-topbar .dy-write-btn { font-size: 1.32em; }

/* 일기 제목 옆 공개 범위 아이콘: 크기는 이전(약 13px)으로 되돌리고, 제목 높이의 가운데에 위치 */
.dy-entry-body h3 { display: flex; align-items: center; gap: 8px; }
.dy-entry-body h3 .dy-vs { font-size: 13px; margin-left: 0; line-height: 1; display: inline-flex; align-items: center; flex: none; }

/* 트윗 닉네임만 조금 더 크게 (아이디·날짜는 그대로) */
.dy-tw-hd b { font-size: 1.2em; }
.dy-who b { font-size: 1.1em; }

/* 상단 바 배경: 카드와 같은 배경색·테두리·모서리 */
.dy-topbar {
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); padding: 10px 12px;
}

/* ═════════ 검색창: 펼치면 게시판 관리 버튼 바로 옆까지 늘어남 ═════════
   간격(.dy-sp)이 차지하던 빈 공간을 검색창이 이어받으며 부드럽게 늘어남 (flex-grow 0 → 1) */
.dy-topbar .dy-search {
  flex: 0 0 auto;
  transition: flex-grow 0.4s cubic-bezier(.3, .8, .25, 1), background 0.3s ease, border-color 0.3s ease;
}
.dy-topbar .dy-search.is-open { flex: 1 1 auto; }
.dy-topbar .dy-search > input[type="text"] {
  width: 0; flex: 1 1 0; min-width: 0; padding: 0; opacity: 0; pointer-events: none;
  transition: padding 0.3s ease, opacity 0.22s ease 0.08s;
}
.dy-topbar .dy-search.is-open > input[type="text"] { padding: 0 16px 0 4px; opacity: 1; pointer-events: auto; }
.dy-topbar .dy-search.is-open ~ .dy-sp { flex: 0 0 0; }
@media (prefers-reduced-motion: reduce) { .dy-topbar .dy-search, .dy-topbar .dy-search > input[type="text"] { transition: none; } }

/* ═════════ 상단 바 버튼에 트윗 작성창 버튼의 CSS 적용 ═════════
   트윗 작성창 버튼: 높이 38px · 모서리 12px · 평소엔 배경/테두리 없이 보조 글자색 · 마우스 올리면/선택되면 연한 포인트색 배경
   (일기 작성 버튼은 올리기 버튼처럼 보조색으로 채우고 카드 배경색 글자) */
.dy-topbar { gap: 8px; align-items: center; }

/* 아이콘 버튼 (보기 전환 · 검색 · 게시판 관리) */
html body .dy-topbar .dy-iconbtn {
  width: 38px; height: 38px; min-width: 38px; border-radius: 12px; padding: 0;
  background: none !important; border: none !important; box-shadow: none; color: var(--dy-sub) !important;
  transition: background 0.2s ease, color 0.2s ease;
}
html body .dy-topbar .dy-iconbtn i { color: inherit; font-size: 16px; }
html body .dy-topbar .dy-iconbtn:hover { background: var(--dy-accent-soft) !important; color: var(--dy-accent) !important; }

/* 전체/트윗/일기 필터: 공개범위 버튼처럼 38px 아이콘 버튼, 선택된 것만 연한 포인트색 */
html body .dy-topbar .dy-seg.dy-filter {
  height: 38px; padding: 0; gap: 8px; background: none !important; border: none !important; border-radius: 0; overflow: visible;
}
html body .dy-topbar .dy-filter > a {
  width: 38px; height: 38px; padding: 0; border-radius: 12px; justify-content: center;
  background: none; color: var(--dy-sub) !important;
}
html body .dy-topbar .dy-filter > a i { color: inherit; font-size: 16px; }
html body .dy-topbar .dy-filter > a:hover { background: var(--dy-accent-soft); color: var(--dy-accent) !important; }
html body .dy-topbar .dy-filter > a.is-on { background: var(--dy-accent-soft); color: var(--dy-accent) !important; }
html body .dy-topbar .dy-filter.has-ind > a.is-on { background: none; }
html body .dy-topbar .dy-filter.has-ind > a.is-on:hover { background: none; }
.dy-topbar .dy-seg-ind { top: 0; bottom: 0; border-radius: 12px; background: var(--dy-accent-soft); }

/* 검색: 접혀 있을 땐 아이콘 버튼, 펼치면 입력칸 모양(12px 모서리) */
.dy-topbar .dy-search { height: 38px; border-radius: 12px; }
html body .dy-topbar .dy-search.is-open { background: var(--dy-form-bg) !important; border: 1px solid var(--dy-form-line) !important; }
html body .dy-topbar .dy-search.is-open .dy-search-btn { width: 36px; height: 36px; min-width: 36px; }
html body .dy-topbar .dy-search.is-open .dy-search-btn:hover { background: var(--dy-accent-soft) !important; }
.dy-topbar .dy-search > input[type="text"] { height: 36px; }

/* 일기 작성 버튼: 올리기 버튼과 같은 방식 (보조색으로 채우고 카드 배경색 글자), 높이 38px · 모서리 12px */
html body .dy-topbar .dy-write-btn {
  height: 38px; padding: 0 18px; border-radius: 12px;
  background: color-mix(in srgb, var(--dy-text) 58%, var(--dy-card)) !important; color: var(--dy-card) !important; box-shadow: none;
  transition: background 0.2s ease;
}
html body .dy-topbar .dy-write-btn i { color: inherit; }
html body .dy-topbar .dy-write-btn:hover { background: var(--dy-accent) !important; filter: none; }

/* 검색창을 켤 때 오른쪽 버튼(게시판 관리·일기 작성)이 흔들리지 않도록:
   검색창이 늘어나는 만큼 간격(.dy-sp)이 같은 속도로 줄어들어서 남는 공간의 합이 항상 일정 */
.dy-topbar .dy-sp { flex: 1 1 0; min-width: 0; transition: flex-grow 0.4s cubic-bezier(.3, .8, .25, 1); }
.dy-topbar .dy-search.is-open ~ .dy-sp { flex: 0 1 0; }
@media (prefers-reduced-motion: reduce) { .dy-topbar .dy-sp { transition: none; } }

/* ═════════ 전체/트윗/일기: 한 묶음으로 보이게 (분할 버튼 틀 + 안에서 미끄러지는 선택 표시) ═════════ */
html body .dy-topbar .dy-seg.dy-filter {
  height: 38px; padding: 3px; gap: 2px; box-sizing: border-box; border-radius: 12px;
  background: var(--dy-faint) !important;
  border: 1px solid color-mix(in srgb, var(--dy-text) 16%, transparent) !important;
}
html body .dy-topbar .dy-filter > a { width: 36px; height: 30px; border-radius: 9px; }
html body .dy-topbar .dy-filter > a:hover { background: color-mix(in srgb, var(--dy-text) 8%, transparent); color: var(--dy-text) !important; }
html body .dy-topbar .dy-filter > a.is-on { background: var(--dy-card); color: var(--dy-accent) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22); }
html body .dy-topbar .dy-filter.has-ind > a.is-on { background: none; box-shadow: none; }
html body .dy-topbar .dy-filter.has-ind > a.is-on:hover { background: none; }
html body .dy-topbar .dy-seg-ind { top: 3px; bottom: 3px; border-radius: 9px; background: var(--dy-card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22); }

/* 보기 전환 버튼: 전체/트윗/일기 묶음과 같은 연한 배경 + 테두리 (검색·게시판 관리는 그대로) */
html body .dy-topbar a.dy-iconbtn {
  background: var(--dy-faint) !important;
  border: 1px solid color-mix(in srgb, var(--dy-text) 16%, transparent) !important;
}
html body .dy-topbar a.dy-iconbtn:hover { background: var(--dy-accent-soft) !important; border-color: color-mix(in srgb, var(--dy-accent) 45%, transparent) !important; }

/* 전체/트윗/일기: 선택돼도 아이콘 색은 바뀌지 않음 (선택 표시는 배경 칩만) */
html body .dy-topbar .dy-filter > a.is-on,
html body .dy-topbar .dy-filter > a.is-on:hover,
html body .dy-topbar .dy-filter > a.is-on i { color: var(--dy-sub) !important; }

/* 상단 바: 마우스를 올려도 아이콘 색은 바뀌지 않음 (배경/테두리 변화만 유지) */
html body .dy-topbar .dy-iconbtn:hover,
html body .dy-topbar .dy-iconbtn:hover i,
html body .dy-topbar .dy-filter > a:hover,
html body .dy-topbar .dy-filter > a:hover i,
html body .dy-topbar .dy-search.is-open .dy-search-btn:hover,
html body .dy-topbar .dy-search.is-open .dy-search-btn:hover i { color: var(--dy-sub) !important; }

/* 검색창 테두리 색: 보기 전환 · 전체/트윗/일기 묶음과 같은 색 */
html body .dy-topbar .dy-search.is-open { border-color: color-mix(in srgb, var(--dy-text) 16%, transparent) !important; }

/* 페이지 버튼은 사이트 공통(.pg_wrap / .pg_page / .pg_current)을 그대로 사용 — a_scrap 과 동일. 위아래 여백만 */

/* 페이지 버튼: a_scrap 과 똑같이 사이트 전역 CSS(.pg_wrap/.pg_page/.pg_current)만 적용되도록
   .dy-wrap 바깥에 두고, 가운데 정렬 폭만 맞춤 (글자·색·box-sizing 등 스킨 스타일을 상속하지 않음) */
.dy-pg-outer { max-width: 860px; margin: 0 auto 70px; padding: 0 16px; }

/* 이미지 위 "+N" 글자: 헤더 폰트 */
.dy-imgs i[data-more]::after, .dy-cm-imgs i[data-more]::after { font-family: var(--header-font-family, var(--dy-font)); }

/* ═════════ 이미지 개별 스포일러 ═════════ */
/* 목록·멘션의 이미지 칸: 흐리게 + 덮개 표시, 누르면 선명하게 */
.dy-spoiler { cursor: pointer; }
.dy-spoiler > img { filter: blur(22px); transform: scale(1.18); transition: filter 0.3s ease, transform 0.3s ease; }
.dy-spoiler.is-revealed > img { filter: none; transform: none; }
.dy-spoiler-badge {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #fff; text-align: center; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); pointer-events: none;
}
.dy-spoiler-badge i { font-size: 1.5em; }
.dy-spoiler-badge b { font-size: 0.95em; font-family: var(--header-font-family, var(--dy-font)); }
.dy-spoiler-badge small { font-size: 0.72em; opacity: 0.9; }
.dy-cm-imgs .dy-spoiler-badge i { font-size: 1.1em; }
.dy-cm-imgs .dy-spoiler-badge small { display: none; }
.dy-spoiler.is-revealed .dy-spoiler-badge { display: none; }

/* 상세 화면 슬라이더 */
.dy-slide[data-spoiler="1"]:not(.is-revealed) { filter: blur(30px); transform: none; }
.dy-slider-spoiler { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.dy-slider-spoiler[hidden] { display: none; }
.dy-slider-spoiler .dy-spoiler-badge { pointer-events: none;  }
.dy-slider-spoiler .dy-spoiler-badge i { font-size: 2.2em; }
.dy-slider-spoiler .dy-spoiler-badge b { font-size: 1.2em; }

/* 작성 화면 이미지 타일: 스포일러 켜기/끄기 버튼 */
.dy-up-spoil {
  position: absolute; left: 2px; top: 2px; width: 22px; height: 22px; border-radius: 50%; z-index: 2;
  background: rgba(0, 0, 0, 0.6); color: #fff !important; font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.dy-up-spoil:hover { background: rgba(0, 0, 0, 0.8); }
.dy-up-tile.is-spoiler img { filter: blur(5px); }
.dy-up-tile.is-spoiler .dy-up-spoil { background: var(--dy-accent); }

/* ═════════ 슬라이더 보정 ═════════ */
/* 스포일러 블러가 오른쪽 패널로 번지지 않도록 이미지 영역 안에서 잘라냄 */
.dy-tl, .dy-slider, .dy-slides { overflow: hidden; }
.dy-tl { isolation: isolate; contain: paint; }

/* 슬라이드 점: 스타일은 그대로, 선택되지 않은 점이 더 밝게 보이도록
   (기본 버튼 초기화 규칙 .dy-thread button{background:none} 에 배경이 지워지고 있었음 → 우선순위를 높여 적용) */
.dy-slider .dy-slider-dots .dy-slider-dot { background: rgba(255, 255, 255, 0.85); }
.dy-slider .dy-slider-dots .dy-slider-dot.is-active { background: #fff; }

/* 선택되지 않은 슬라이드 점: 조금 더 어둡게 (선택된 점은 그대로 흰색) */
.dy-slider .dy-slider-dots .dy-slider-dot { background: rgba(255, 255, 255, 0.55); }

/* 슬라이더: 이미지 비율이 달라 남는 빈 영역(검은 부분)에 현재 이미지를 흐리게 + 옅은 흰색을 살짝 덮어서 깔아줌 */
.dy-slider-bgwrap { position: absolute; inset: 0; overflow: hidden; background: rgba(0, 0, 0, 0.35); }
.dy-slider-bg {
  position: absolute; inset: -40px; background-size: cover; background-position: center; background-repeat: no-repeat;
  filter: blur(32px); transform: scale(1.1);
}
.dy-slider-bgwrap::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.16); }

/* 검색창 글자색: 상단 바 버튼 아이콘 색(보조 글자색)과 통일 */
html body .dy-topbar .dy-search input[type="text"] { color: var(--dy-sub) !important; caret-color: var(--dy-sub); }
html body .dy-topbar .dy-search input[type="text"]::placeholder { color: var(--dy-sub); opacity: 1; }

/* ═════════════════════════════════════════════════════════════════
   게시판 관리 창 + 일기 작성 페이지: 지금까지 정한 디자인 규칙으로 통일
   · 버튼 높이 38px · 모서리 12px · 보조색 배경 + 연한 테두리 (마우스 올리면 테두리만 포인트색)
   · 선택된 상태 = 연한 포인트색 배경 + 포인트색 테두리/글자
   · 주요 버튼(저장) = 보조색으로 채우고 카드 배경색 글자, 마우스 올리면 포인트색 배경
   · 제목류 글자는 헤더 폰트 · 입력칸은 높이 38px · 포커스해도 모양 변화 없음
   ═════════════════════════════════════════════════════════════════ */
.dy-write-wrap, .dy-panel {
  --dy-c-line: color-mix(in srgb, var(--dy-text) 24%, transparent);
  --dy-c-fill: color-mix(in srgb, var(--dy-text) 58%, var(--dy-card));
}

/* 일반 버튼 (파일 첨부 · 링크로 추가 · 기분 추가 · 취소) */
html body .dy-write-wrap .dy-btn-sm, html body .dy-write-wrap .dy-btn-ghost,
html body .dy-panel .dy-btn-sm {
  box-sizing: border-box; height: 38px; padding: 0 16px; border-radius: 12px; font-size: 0.93em;
  background: var(--dy-sec-bg); color: var(--dy-sec-text) !important; border: 1px solid var(--dy-c-line);
  transition: border-color 0.2s ease;
}
html body .dy-write-wrap .dy-btn-sm:hover, html body .dy-write-wrap .dy-btn-ghost:hover,
html body .dy-panel .dy-btn-sm:hover { border-color: var(--dy-accent); color: var(--dy-sec-text) !important; }

/* 주요 버튼 (일기 저장하기 · 게시판 관리 저장) */
html body .dy-write-wrap .dy-btn-main, html body .dy-panel .dy-btn-main {
  box-sizing: border-box; height: 38px; padding: 0 24px; border-radius: 12px; font-size: 0.93em; font-weight: 600;
  background: var(--dy-c-fill) !important; color: var(--dy-card) !important; border: none; box-shadow: none;
  transition: background 0.2s ease;
}
html body .dy-write-wrap .dy-btn-main:hover, html body .dy-panel .dy-btn-main:hover { background: var(--dy-accent) !important; filter: none; }
html body .dy-write-wrap .dy-btn-main:disabled, html body .dy-panel .dy-btn-main:disabled { opacity: 0.5; }

/* 입력칸: 높이 38px · 모서리 12px (여러 줄 칸은 모서리만) */
html body .dy-write-wrap .dy-input, html body .dy-panel .dy-input { height: 38px; border-radius: 12px; }
html body .dy-write-wrap .dy-textarea { border-radius: 12px; }

/* 제목 · 날짜는 헤더 폰트 */
.dy-write-wrap .dy-dateline .d, .dy-write-wrap .dy-title-in, .dy-panel-head strong { font-family: var(--header-font-family, var(--dy-title-font)); }
.dy-write-wrap .dy-dateline .d { font-size: 1.9em; }

/* 게시판 관리 창: 닫기 버튼은 상단 바 아이콘 버튼과 같게, 기분 미리보기·삭제는 같은 38px/12px */
html body .dy-panel .dy-iconbtn {
  width: 38px; height: 38px; border-radius: 12px; padding: 0; background: none !important; border: none !important; color: var(--dy-sub) !important;
}
html body .dy-panel .dy-iconbtn:hover { background: var(--dy-accent-soft) !important; }
.dy-panel .dy-manage-prev { width: 38px; height: 38px; border-radius: 12px; background: var(--dy-sec-bg); border: 1px solid var(--dy-c-line); }
.dy-panel .dy-manage-row { grid-template-columns: 38px 1fr 68px 1.4fr 38px; }
.dy-panel .dy-manage-head { grid-template-columns: 38px 1fr 68px 1.4fr 38px; }
.dy-panel .dy-manage-del, .dy-panel .dy-manage-lock { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.dy-panel .dy-manage-del { color: var(--dy-sub) !important; }
.dy-panel .dy-manage-del:hover { background: color-mix(in srgb, #e0524f 14%, transparent); color: #e0524f !important; }
.dy-panel .dy-panel-head { margin-bottom: 14px; }
@media (max-width: 768px) {
  .dy-panel .dy-manage-row { grid-template-columns: 38px 1fr 60px 38px; }
}

/* ═════════ 이번 수정 ═════════ */
/* 일기 작성 페이지 컨테이너 아래 여백 */
.dy-write-wrap { margin-bottom: 60px; }
/* 글쓰기 화면의 이미지·태그·기분·공개범위 줄은 트윗 작성창과 같은 규격을 그대로 사용 (.dy-tweet-form / .dy-tweet-foot) */
.dy-write-wrap .dy-tweet-foot { margin-top: 18px; }

/* 게시판 관리 창: 기분 추가 버튼은 가로 전체 */
.dy-panel [data-manage-add] { display: flex; width: 100%; justify-content: center; }

/* 모든 버튼의 글꼴은 헤더 폰트 (입력칸은 제외) */
html body :is(.dy-wrap, .dy-thread, .dy-panel, .dy-float) :is(button, .dy-btn-main, .dy-btn-ghost, .dy-btn-sm, .dy-seg > label, .dy-seg > a, .dy-reply-btn, .dy-xbtn) {
  font-family: var(--header-font-family, var(--dy-font));
}

/* ═════════ 리트윗 · 인용 · 볼 수 없는 글 표시 ═════════ */
/* 멘션/리트윗/인용 버튼: 같은 크기·같은 모양 */
.dy-act { display: inline-flex; align-items: center; gap: 5px; font-size: 0.86em; color: var(--dy-sub) !important; padding: 4px 8px; border-radius: 14px; border: none; background: none; cursor: pointer; line-height: 1; }
.dy-act:hover { background: var(--dy-accent-soft); color: var(--dy-accent) !important; }
.dy-act i { font-size: 15px; }
.dy-act.is-on { color: var(--dy-accent) !important; }
.dy-tw-act { gap: 2px; }
.dy-th-act { margin-top: 8px; display: flex; align-items: center; gap: 2px; margin-left: -8px; }

/* "OOO 님이 리트윗" 한 줄 */
.dy-rt-label { font-size: 0.8em; color: var(--dy-sub); margin: 0 0 4px 22px; display: flex; align-items: center; gap: 6px; }
.dy-rt-label i { font-size: 0.95em; }

/* 인용 카드 (트윗 본문 아래, 글 글자 열에 맞춤) */
.dy-tw-quote { grid-column: 2; margin-top: 10px; min-width: 0; }
.dy-th-body .dy-tw-quote { margin-top: 10px; }
.dy-quote {
  position: relative; border: 1px solid color-mix(in srgb, var(--dy-text) 20%, transparent); border-radius: 14px; padding: 12px 14px;
  background: var(--dy-card); overflow: hidden; transition: border-color 0.2s ease;
}
.dy-quote:not(.dy-quote-locked):hover { border-color: var(--dy-accent); }
.dy-quote-link { position: absolute; inset: 0; z-index: 1; border-radius: 14px; }
.dy-quote-hd { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 0.9em; }
.dy-quote-hd b { font-family: var(--header-font-family, var(--dy-font)); }
.dy-quote-hd span { color: var(--dy-sub); font-size: 0.9em; }
.dy-avatar.dy-avatar-xs { width: 24px; height: 24px; font-size: 0.7em; }
.dy-quote-tx { margin-top: 6px; font-size: 0.95em; line-height: 1.65; word-break: break-word; position: relative; z-index: 2; pointer-events: none; }
.dy-quote-tx a { pointer-events: auto; }
.dy-quote-img { margin-top: 8px; border-radius: 10px; overflow: hidden; max-height: 180px; }
.dy-quote-img img { width: 100%; max-height: 180px; object-fit: cover; display: block; }
/* 볼 수 없거나 삭제된 글을 인용한 경우 */
.dy-quote-locked { display: flex; align-items: center; gap: 8px; color: var(--dy-sub); font-size: 0.93em; }

/* 인용할 글을 작성창에 미리 보여줌 */
.dy-compose-quote { position: relative; margin-top: 12px; }
.dy-compose-quote-x {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--dy-card); border: 1px solid var(--dy-line); color: var(--dy-sub) !important; font-size: 12px;
}
.dy-compose-quote-x:hover { color: var(--dy-accent) !important; border-color: var(--dy-accent); }

/* 볼 권한이 없는 글(비공개/멤버 공개): 작성자·내용 없이 한 줄만 */
.dy-restricted {
  display: flex; align-items: center; gap: 10px; padding: 16px 22px; margin-bottom: 12px; font-size: 0.95em;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); color: var(--dy-sub);
}
.dy-restricted i { font-size: 0.95em; }

/* 인용 작성 중인 카드: 본문(.dy-text)이 시작하는 곳에 맞춰 글 열의 가로만 차지 (프로필 사진 폭 + 간격만큼 안쪽으로) */
.dy-compose-quote { margin-left: 56px; }
@media (max-width: 768px) { .dy-compose-quote { margin-left: 52px; } }

/* 인용 카드 어디를 눌러도 해당 게시물로 이동: 링크 덮개를 글자 위에 두고, 글자는 클릭을 통과시킴 (글 안의 링크만 따로 클릭 가능) */
.dy-quote:not(.dy-quote-locked) { cursor: pointer; }
.dy-quote-link { z-index: 3; }
.dy-quote-hd, .dy-quote-img { pointer-events: none; }
.dy-quote-tx a { position: relative; z-index: 4; pointer-events: auto; }
/* 작성 중인 인용 카드는 눌러도 이동하지 않음 (쓰던 글을 잃지 않도록) */
.dy-compose-quote .dy-quote-link { display: none; }
.dy-compose-quote .dy-quote { cursor: default; }

/* 인용 카드 안의 링크 카드 */
.dy-quote-tx .dy-link-card { margin: 8px 0 0; padding: 10px 12px; }
.dy-quote-tx .dy-text + .dy-link-card, .dy-quote-tx .dy-link-card + .dy-text { margin-top: 8px; }
.dy-quote-more { color: var(--dy-sub); }

/* ═════════ 페이지 이동 로딩 화면 ═════════ */
.dy-page-loader {
  position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.38); opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.dy-page-loader.is-active { opacity: 1; pointer-events: auto; }
.dy-page-loader-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.35); border-top-color: var(--accent-color, #fff);
  animation: dy-spin 0.8s linear infinite;
}
@keyframes dy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dy-page-loader-ring { animation-duration: 2s; } }

/* 리트윗 아이콘 하나 + "끌어 올리기 / 인용 하기" 메뉴 */
.dy-rt-wrap { display: inline-flex; }
.dy-rt-wrap .dy-act { padding: 4px 8px; }
.dy-rt-menu { min-width: 150px; padding: 6px; border-radius: 14px; }
.dy-rt-menu a, .dy-rt-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 10px; text-align: left;
  font-size: 0.95em; white-space: nowrap; color: var(--dy-text) !important; background: none; border: none; cursor: pointer;
  font-family: var(--header-font-family, var(--dy-font));
}
.dy-rt-menu a:hover, .dy-rt-menu button:hover { background: var(--dy-accent-soft); }
.dy-rt-menu i { width: 18px; text-align: center; font-size: 16px; color: var(--dy-sub); }
.dy-rt-menu .dy-rt-item.is-on, .dy-rt-menu .dy-rt-item.is-on i { color: var(--dy-accent) !important; }

/* ═════════ 끌올된 글: 프로필·닉네임 위에 "↻ 000 님이 재게시함" (아이콘은 프로필 사진 위, 글자는 닉네임 위) ═════════ */
.dy-rt-label {
  grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; gap: var(--dy-avgap, 14px);
  margin: 0 0 6px; font-size: 0.86em; color: var(--dy-sub); font-weight: 600;
}
.dy-rt-ico { width: var(--dy-av, 44px); flex: none; display: flex; justify-content: flex-end; }
.dy-rt-ico i { font-size: 1.05em; }
.dy-tw.has-rt .dy-avatar { grid-row: 2 / span 2; }
/* 트윗 상세 화면 */
.dy-th-rt { padding: 12px 18px 0; }
.dy-th-rt .dy-rt-label { grid-row: auto; margin: 0; gap: 10px; }
.dy-th-rt .dy-rt-ico { width: auto; }
.dy-th-rt + .dy-th-head { padding-top: 6px; }

/* ═════════ 멘션 버튼 · 리트윗 버튼: 같은 크기 (높이 32px · 아이콘 17px · 모서리 14px) ═════════ */
html body .dy-tw-act .dy-thr,
html body .dy-tw-act .dy-act,
html body .dy-th-act .dy-act,
html body .dy-rt-wrap .dy-act {
  box-sizing: border-box; height: 32px; min-width: 38px; padding: 0 10px; border-radius: 14px; gap: 5px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.86em; line-height: 1;
}
html body .dy-tw-act .dy-thr { margin-left: -10px; }
.dy-tw-act .dy-thr svg { width: 17px; height: 17px; }
.dy-tw-act .dy-act i, .dy-th-act .dy-act i { font-size: 17px; }

/* 수정 · 삭제 등 메뉴 항목 글꼴: 헤더 폰트 */
.dy-menu a, .dy-menu button { font-family: var(--header-font-family, var(--dy-font)); }

/* ═════════ 로딩 화면: a_scrap 의 .scrap-page-loader 와 같은 모양 (어두운 반투명 + 블러 + 흰색 스피너 아이콘) ═════════ */
.dy-page-loader {
  display: none; position: fixed; inset: 0; align-items: center; justify-content: center; z-index: 2147483000;
  background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .2s ease; pointer-events: auto;
}
.dy-page-loader.is-active { display: flex; opacity: 1; }
.dy-page-loader i { color: #fff; font-size: 2rem; }

/* 본문 속 해시태그(#태그)도 태그 칩(.dy-tg)과 같은 모양 */
.dy-wrap a.hashtag, .dy-thread a.hashtag, .dy-float a.hashtag, .dy-quote a.hashtag {
  display: inline-block; background: var(--dy-accent-soft); color: var(--dy-accent) !important;
  font-size: 0.8em; line-height: 1.5; padding: 2px 10px; border-radius: 999px; margin: 0 2px; vertical-align: baseline; text-decoration: none;
}
.dy-wrap a.hashtag:hover, .dy-thread a.hashtag:hover, .dy-float a.hashtag:hover, .dy-quote a.hashtag:hover { filter: brightness(1.15); }

/* ═════════ 멘션 입력창: 입력 글자·안내 문구·"입력" 버튼 색을 다른 버튼과 통일 ═════════ */
html body .dy-cinput .dy-cinput-text { color: var(--dy-sub) !important; caret-color: var(--dy-sub); }
html body .dy-cinput .dy-cinput-text::placeholder { color: var(--dy-sub); opacity: 1; }
html body .dy-cinput .dy-cinput-submit {
  box-sizing: border-box; height: 38px; padding: 0 22px; border-radius: 12px; font-size: 0.93em;
  background: color-mix(in srgb, var(--dy-text) 58%, var(--dy-card)) !important; color: var(--dy-card) !important; border: none; box-shadow: none;
  font-family: var(--header-font-family, var(--dy-font)); transition: background 0.2s ease;
}
html body .dy-cinput .dy-cinput-submit:hover { background: var(--dy-accent) !important; filter: none; }

/* 채워진 버튼(입력 · 일기 작성 · 올리기 · 저장)이 평소에 글자가 배경과 겹쳐 보이던 문제:
   배경을 글자색 쪽으로 더 진하게 해서 글자(카드 배경색)와의 대비를 키움 */
html body .dy-cinput .dy-cinput-submit,
html body .dy-topbar .dy-write-btn,
html body .dy-tweet-foot .dy-submit-icon {
  background: color-mix(in srgb, var(--dy-text) 78%, var(--dy-card)) !important;
}
html body .dy-write-wrap .dy-btn-main, html body .dy-panel .dy-btn-main {
  background: color-mix(in srgb, var(--dy-text) 78%, var(--dy-card)) !important;
}
html body .dy-cinput .dy-cinput-submit:hover,
html body .dy-topbar .dy-write-btn:hover,
html body .dy-tweet-foot .dy-submit-icon:hover,
html body .dy-write-wrap .dy-btn-main:hover, html body .dy-panel .dy-btn-main:hover { background: var(--dy-accent) !important; }

/* 본문 해시태그가 평소에 겹쳐 보이던 문제: 사이트 전역 .hashtag 에 걸린 filter: drop-shadow(2px 2px …)가
   칩 뒤에 그림자 복사본을 만들고 있었음 → 그림자를 없애고, 마우스 올릴 때 밝기만 바뀌게 함 */
.dy-wrap a.hashtag, .dy-thread a.hashtag, .dy-float a.hashtag, .dy-quote a.hashtag {
  filter: none !important; box-shadow: none; border: 0; transition: background 0.2s ease;
}
.dy-wrap a.hashtag:hover, .dy-thread a.hashtag:hover, .dy-float a.hashtag:hover, .dy-quote a.hashtag:hover {
  filter: none !important; background: color-mix(in srgb, var(--dy-accent) 26%, transparent);
}

/* 스포일러 덮개의 "눌러서 보기" 이탤릭 해제 */
.dy-spoiler-badge, .dy-spoiler-badge small, .dy-spoiler-badge b { font-style: normal; }

/* 이미지 위 "+N" 글자 크기 키움 */
.dy-imgs i[data-more]::after { font-size: 34px; }
.dy-cm-imgs i[data-more]::after { font-size: 26px; }

/* 멘션(말풍선) 아이콘의 선 굵기를 리트윗 아이콘(FontAwesome, 17px)과 비슷하게 맞춤 */
.dy-tw-act .dy-thr svg, .dy-cmt-count svg { stroke-width: 2.6; }

/* 메뉴 항목(끌올 · 인용 · 수정 · 삭제) 글자 중앙 정렬 */
html body .dy-menu a, html body .dy-menu button,
html body .dy-rt-menu a, html body .dy-rt-menu button {
  justify-content: center; text-align: center;
}

/* 메뉴 항목: 글자는 가운데, 아이콘은 왼쪽 끝에 고정 */
html body .dy-menu a, html body .dy-menu button,
html body .dy-rt-menu a, html body .dy-rt-menu button {
  position: relative; padding-left: 40px; padding-right: 40px;
}
html body .dy-menu a > i, html body .dy-menu button > i,
html body .dy-rt-menu a > i, html body .dy-rt-menu button > i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; text-align: center;
}

/* 글자는 "아이콘 영역(왼쪽 40px)을 뺀 나머지 영역"의 가운데에 오도록 */
html body .dy-menu a, html body .dy-menu button,
html body .dy-rt-menu a, html body .dy-rt-menu button {
  padding-left: 40px; padding-right: 0;
}

/* 캘린더 상단(2026년 10월)과 요일·날짜 숫자: 헤더 폰트 */
.dy-cal-head, .dy-cal-head strong { font-family: var(--header-font-family, var(--dy-font)); }

/* 캘린더 컨테이너 아래 여백 */
.dy-calbox { margin-bottom: 60px; }

/* 일기 카드 썸네일: 가로·세로 모두 110px 고정, 채우기(cover) 방식 */
.dy-entry-ph { width: 110px; height: 110px; align-self: center; border-radius: 10px; overflow: hidden; }
.dy-entry-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ═════════ 멘션 스레드: 댓글과 답글을 한 줄로 이어서 보여줌 ═════════
   들여쓰기 없이 모두 같은 세로 줄에 놓고, 바로 이어지는 답글은 프로필 사진 사이를 세로선으로 연결 */
.dy-cm { margin-left: 0 !important; position: relative; }
.dy-cm.has-down::after {
  content: ''; position: absolute; left: 15px; top: 44px; bottom: 0; width: 2px; border-radius: 1px;
  background: color-mix(in srgb, var(--dy-text) 22%, transparent);
}
.dy-cm.has-up::before {
  content: ''; position: absolute; left: 15px; top: 0; height: 12px; width: 2px;
  background: color-mix(in srgb, var(--dy-text) 22%, transparent);
}

/* 긴 일기(읽기 화면 본문 · 작성 에디터)에서는 이모티콘 크기를 스킨이 바꾸지 않음 (원래 크기 그대로) */
.dy-wrap .dy-read-body .ra0-emoticon, .dy-wrap .dy-write-wrap .ra0-emoticon, .dy-write-wrap .ra0-emoticon, .dy-read-body .ra0-emoticon {
  height: auto; width: auto; vertical-align: middle;
}

/* ═════════ 긴 일기 안의 이미지 슬라이더 보정 ═════════
   .dy-wrap button { background:none; border:none; … } 같은 스킨 기본 버튼 초기화 규칙이 슬라이더 버튼(화살표·점)의
   배경·테두리를 지우고 있었음 → 슬라이더 안에서는 우선순위를 높여 다시 지정하고, 상자 크기도 확실히 고정 */
.dy-readpaper .dy-slider {
  position: relative; display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; min-height: 200px;
  margin: 22px 0; border-radius: 12px; overflow: hidden; background: var(--dy-faint);
}
.dy-readpaper .dy-slider .dy-slides { position: absolute; inset: 0; }
.dy-readpaper .dy-slider .dy-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; margin: 0; border-radius: 0; }
.dy-slider .dy-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; padding: 0; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.78); color: #222 !important; cursor: pointer;
}
.dy-slider .dy-slider-arrow:hover { background: #fff; }
.dy-slider .dy-slider-arrow.prev { left: 14px; }
.dy-slider .dy-slider-arrow.next { right: 14px; }
.dy-slider .dy-slider-count { position: absolute; z-index: 2; top: 14px; right: 14px; }
.dy-slider .dy-slider-dots { z-index: 2; }
.dy-slider .dy-slider-dots .dy-slider-dot { padding: 0; border: none; cursor: pointer; flex: none; }

/* ═════════ 이미지 크게 보기(라이트박스) 보정 ═════════
   라이트박스는 body 바로 아래에 만들어져서 스킨 안쪽(.dy-wrap)의 버튼 초기화 규칙을 못 받고,
   사이트 전역 button / img 스타일이 그대로 섞여서 모양이 깨졌음 → 라이트박스 안에서 스스로 초기화한 뒤 다시 꾸밈 */
.dy-lightbox {
  position: fixed; inset: 0; z-index: 100010; display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.88); margin: 0; padding: 0; font-family: var(--dy-font);
}
.dy-lightbox.open { display: flex; }
.dy-lightbox button { all: unset; box-sizing: border-box; cursor: pointer; }
.dy-lightbox img {
  display: block; width: auto; height: auto; max-width: 92vw; max-height: 90vh; object-fit: contain; margin: 0; padding: 0;
  border: 0; border-radius: 6px; box-shadow: none; background: none; filter: none;
}
.dy-lightbox .dy-lightbox-close {
  position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  color: #fff !important; font-size: 34px; line-height: 1; border-radius: 50%;
}
.dy-lightbox .dy-lightbox-close:hover { background: rgba(255, 255, 255, 0.14); }
.dy-lightbox .dy-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.18); color: #fff !important; font-size: 16px;
}
.dy-lightbox .dy-lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); }
.dy-lightbox .dy-lightbox-nav.prev { left: 18px; }
.dy-lightbox .dy-lightbox-nav.next { right: 18px; }
.dy-lightbox .dy-lightbox-nav i { color: inherit; }

/* 링크 칩: [텍스트](주소) — 알약 모양, 링크 아이콘 + 텍스트 */
.dy-wrap a.dy-md-link-chip, .dy-thread a.dy-md-link-chip, .dy-float a.dy-md-link-chip, .dy-quote a.dy-md-link-chip {
  display: inline-flex; align-items: center; gap: 5px; background: var(--dy-accent-soft); color: var(--dy-accent) !important;
  border-radius: 999px; padding: 2px 12px; font-size: 0.9em; line-height: 1.5; margin: 0 2px; vertical-align: baseline; text-decoration: none;
  transition: background 0.2s ease;
}
.dy-wrap a.dy-md-link-chip:hover, .dy-thread a.dy-md-link-chip:hover, .dy-float a.dy-md-link-chip:hover, .dy-quote a.dy-md-link-chip:hover {
  background: color-mix(in srgb, var(--dy-accent) 26%, transparent);
}
.dy-md-link-chip i { font-size: 0.85em; }

/* 링크 칩 위아래 안쪽 여백 줄임 */
.dy-wrap a.dy-md-link-chip, .dy-thread a.dy-md-link-chip, .dy-float a.dy-md-link-chip, .dy-quote a.dy-md-link-chip {
  padding-top: 0; padding-bottom: 0; line-height: 1.45;
}

/* 링크 칩이 글자보다 아래로 내려가 보이던 문제:
   inline-flex 는 칩 안 아이콘 기준으로 줄에 맞춰져서 어긋났음 → inline-block 으로 바꿔 글자 기준선(baseline)에 맞춤 */
.dy-wrap a.dy-md-link-chip, .dy-thread a.dy-md-link-chip, .dy-float a.dy-md-link-chip, .dy-quote a.dy-md-link-chip {
  display: inline-block; vertical-align: baseline; gap: 0; position: relative; top: -0.04em;
}
.dy-md-link-chip i { margin-right: 5px; vertical-align: baseline; }

/* 링크 칩: 좌우 여백을 줄이고, 주변 글자의 가운데 높이에 맞춤 */
.dy-wrap a.dy-md-link-chip, .dy-thread a.dy-md-link-chip, .dy-float a.dy-md-link-chip, .dy-quote a.dy-md-link-chip {
  padding-left: 9px; padding-right: 9px; vertical-align: middle; top: 0; line-height: 1.5;
}
.dy-md-link-chip i { margin-right: 4px; }

/* ═════════ 글쓰기 · 수정: 트윗 ↔ 일기 전환 ═════════ */
.dy-writeform[data-dy-mode="tweet"] .dy-only-diary { display: none !important; }
.dy-writeform[data-dy-mode="diary"] .dy-only-tweet { display: none !important; }
.dy-type-switch { margin-bottom: 18px; }
html body .dy-write-wrap .dy-type-switch {
  display: inline-flex; height: 38px; padding: 3px; gap: 2px; box-sizing: border-box; border-radius: 12px;
  background: var(--dy-faint); border: 1px solid color-mix(in srgb, var(--dy-text) 16%, transparent);
}
html body .dy-write-wrap .dy-type-switch > label {
  height: 30px; padding: 0 14px; border-radius: 9px; gap: 6px; font-size: 0.93em; color: var(--dy-sub) !important;
  font-family: var(--header-font-family, var(--dy-font)); transition: background 0.2s ease, color 0.2s ease;
}
html body .dy-write-wrap .dy-type-switch > label:has(input:checked) { background: var(--dy-card); color: var(--dy-text) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22); }

/* ═════════ 장소(위치) ═════════ */
/* 작성 화면: 📍 버튼으로 펼치는 입력 줄 (이름 + 링크 선택) */
.dy-tweet-loc { display: none; gap: 8px; margin-top: 10px; }
.dy-tweet-loc.is-open { display: flex; }
.dy-tweet-loc .dy-input:first-child { flex: 1 1 40%; min-width: 0; }
.dy-tweet-loc .dy-input:last-child { flex: 1 1 60%; min-width: 0; }
@media (max-width: 600px) { .dy-tweet-loc.is-open { flex-direction: column; } }

/* 글에 표시되는 장소 한 줄 */
.dy-loc { display: block; margin-top: 6px; font-size: 0.86em; color: var(--dy-sub); line-height: 1.5; }
.dy-loc a { color: inherit !important; text-decoration: none; display: inline-flex; align-items: baseline; gap: 5px; }
.dy-loc a { padding: 2px 9px; margin-left: -9px; border-radius: 999px; transition: background .15s; }
.dy-loc a:hover, .dy-loc a:focus { text-decoration: none !important; background: color-mix(in srgb, var(--dy-accent) 14%, transparent); }
.dy-loc a:hover span, .dy-loc a:focus span { text-decoration: none !important; }
.dy-loc i { color: var(--dy-accent); font-size: 0.95em; margin-right: 5px; }
.dy-loc a i { margin-right: 0; }
.dy-loc span { font-family: var(--dy-font); }
.dy-tw > .dy-loc { grid-column: 2; }
.dy-read-title + .dy-loc { margin: -3px 0 16px; }

/* ───────── 글쓰기 화면: 구조(평소) / 나란히 보기(PC) ─────────
   평소: 글 박스 하나 안에 [컨트롤 위쪽 → 에디터 → 도구 → 버튼] 순서로 원래대로 보임
   나란히 보기: [컨트롤 박스][에디터 박스][미리보기 박스] 가로 3칸 + 버튼은 박스 바깥 아래 */
.dy-write-wrap .dy-writepaper { display: flex; flex-direction: column; max-height: 80vh; overflow-y: auto; }
.dy-write-ctl { display: contents; }
.dy-write-ctl > * { order: 1; }
.dy-write-ctl > .dy-write-tools { order: 3; }
.dy-write-ed { order: 2; }
.dy-write-actions { margin-top: 20px; }
.dy-write-ctl .dy-write-tools { display: block; }

.dy-split-btn { display: none; }
.dy-split-btn.is-on { background: color-mix(in srgb, var(--dy-accent) 14%, transparent); }
.dy-split-tip { font-size: 0.9em; padding: 0 4px 10px; }
.dy-split-tip em { font-style: normal; font-size: 0.85em; color: var(--dy-sub); margin-left: 8px; }
.dy-split-date { color: var(--dy-sub); font-size: 0.88em; margin-bottom: 8px; }
.dy-split-pane .dy-read-title + .dy-split-loc .dy-loc { margin: -3px 0 16px; }
.dy-split-pane { background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); }
.dy-split-pane .dy-split-tip { padding: 14px 26px 0; }
.dy-split-pane .dy-paper { border: 0; border-radius: 0; background: transparent; padding: 24px 26px; font-size: 0.94em; }

@media (min-width: 1100px) {
  .dy-split-btn { display: inline-flex; align-items: center; gap: 6px; }
  .dy-write-wrap.is-split { max-width: 1680px; display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .dy-write-wrap.is-split .dy-writeform, .dy-write-wrap.is-split .dy-writepaper { display: contents; }
  .dy-write-wrap.is-split .dy-write-ctl, .dy-write-wrap.is-split .dy-write-ed, .dy-write-wrap.is-split .dy-split-pane {
    display: block; box-sizing: border-box; height: 80vh; max-height: 80vh; overflow-y: auto; order: 0;
    background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); padding: 22px 22px;
  }
  .dy-write-wrap.is-split .dy-write-ctl { grid-column: 1; grid-row: 1; }
  .dy-write-wrap.is-split .dy-write-ed { grid-column: 2; grid-row: 1; }
  /* 에디터 박스는 박스 자체가 아니라 에디터 본문 영역이 스크롤되게 해서, 텍스트 꾸미기 등 에디터 메뉴가 박스 밖으로 잘리지 않고 펼쳐지게 함 */
  .dy-write-wrap.is-split .dy-write-ed { display: flex; flex-direction: column; overflow: visible; }
  .dy-write-wrap.is-split .dy-write-ed > .dy-field { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 0; }
  .dy-write-wrap.is-split .dy-write-ed .ra0-editor-wrapper { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .dy-write-wrap.is-split .dy-write-ed .ra0-editor-viewer { flex: 1 1 auto; min-height: 0; max-height: none; }
  .dy-write-wrap.is-split .dy-split-pane { grid-column: 3; grid-row: 1; padding: 0; position: sticky; top: 60px; }
  .dy-write-wrap.is-split .dy-write-ctl > * { order: 0; }
  .dy-write-wrap.is-split .dy-write-tools { margin-top: 18px; }
  .dy-write-wrap.is-split .dy-tweet-foot { flex-wrap: wrap; gap: 8px; }
  /* 좁은 컨트롤 박스 안에서 기분 선택창이 잘리지 않도록: 박스 폭에 맞춰 줄바꿈 */
  .dy-write-wrap.is-split .dy-write-tools { position: relative; }
  .dy-write-wrap.is-split .dy-mood-wrap { position: static; }
  .dy-write-wrap.is-split .dy-mood-pop { left: 0; right: 0; width: auto; box-sizing: border-box; }
  .dy-write-wrap.is-split .dy-mood-pop .dy-mood-pick { flex-wrap: wrap; }
  .dy-write-wrap.is-split .dy-write-actions { grid-column: 1 / -1; grid-row: 2; order: 0; margin-top: 8px; }
}
.dy-write-ctl > .dy-type-switch { align-self: flex-start; }
/* 글자와 같은 줄에 있는 이모티콘: 글자 크기에 맞춰 줄임 (이모티콘만 있는 줄은 원래 크기) */
.dy-read-body img.ra0-emoticon.dy-emo-inline { height: var(--ra0-emo-size, 1.6em); width: auto; max-height: none; vertical-align: middle; }

/* ───────── 캘린더: TODAY · 연/월 선택 메뉴 ───────── */
.dy-calbox { position: relative; transition: opacity .15s; }
.dy-calbox.is-loading { opacity: .5; pointer-events: none; }
.dy-cal-today {
  position: absolute; top: 16px; right: 18px; z-index: 2; font-size: 0.72em; font-weight: 700; letter-spacing: 0.06em;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--dy-line); color: var(--dy-sub) !important; text-decoration: none !important;
  background: transparent; transition: background .15s, color .15s;
}
.dy-cal-today:hover { background: color-mix(in srgb, var(--dy-accent) 14%, transparent); color: var(--dy-text) !important; }
.dy-cal-titlewrap { position: relative; display: inline-flex; justify-content: center; }
.dy-cal-title {
  font: inherit; color: inherit; background: transparent; border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: background .15s;
}
.dy-cal-title i { font-size: 0.6em; color: var(--dy-sub); }
.dy-cal-title:hover, .dy-cal-title[aria-expanded="true"] { background: color-mix(in srgb, var(--dy-accent) 14%, transparent); }
.dy-cal-pop {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 30; width: 260px; padding: 12px;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22); font-size: 15px; font-weight: 500;
}
.dy-cal-pop[hidden] { display: none; }
.dy-cal-pop-year { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dy-cal-pop-year strong { font-size: 1.05em; }
.dy-cal-pop-year button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--dy-sub); cursor: pointer; }
.dy-cal-pop-year button:hover { background: color-mix(in srgb, var(--dy-accent) 14%, transparent); }
.dy-cal-pop-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.dy-cal-pop-months button { font: inherit; padding: 8px 0; border: 0; border-radius: 999px; background: transparent; color: var(--dy-text); cursor: pointer; }
.dy-cal-pop-months button:hover { background: color-mix(in srgb, var(--dy-accent) 14%, transparent); }
.dy-cal-pop-months button.is-cur { background: var(--dy-accent); color: #fff; }
/* 달 이동: 박스는 고정, 달력 칸만 부드럽게 교체 */
.dy-calbox.is-loading { opacity: 1; pointer-events: auto; }
.dy-bigcal { transition: opacity .14s ease, height .28s ease; overflow: hidden; }
.dy-bigcal.is-swap { opacity: 0; }

/* 일기 작성 버튼: 상단 막대의 다른 버튼(보기 전환 등)과 같은 스타일 — 연한 배경 + 테두리, 보조색 글자, 마우스 올리면 강조색 배경 */
html body .dy-topbar a.dy-write-btn {
  height: 38px; padding: 0 16px; border-radius: 12px; font-size: 0.93em; font-weight: 400; gap: 8px;
  display: inline-flex; align-items: center;
  background: var(--dy-faint) !important; color: var(--dy-sub) !important;
  border: 1px solid color-mix(in srgb, var(--dy-text) 16%, transparent) !important; box-shadow: none; filter: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
html body .dy-topbar a.dy-write-btn i { color: inherit; font-size: 16px; }
html body .dy-topbar a.dy-write-btn:hover, html body .dy-topbar a.dy-write-btn:hover i {
  background: var(--dy-accent-soft) !important; color: var(--dy-sub) !important;
}
html body .dy-topbar a.dy-write-btn:hover { border-color: color-mix(in srgb, var(--dy-accent) 45%, transparent) !important; }
html body .dy-topbar a.dy-write-btn { width: 38px; min-width: 38px; padding: 0; justify-content: center; flex: none; }
/* 상단 막대 아래 내용만 부드럽게 교체 */
.dy-list-content { transition: opacity .14s ease; }
.dy-list-content.is-swap { opacity: 0; }

/* 월 선택: 지금 보는 달 버튼만 상단 막대의 보기 전환 버튼과 같은 스타일 (연한 배경 + 테두리, 보조색 글자) — 나머지 월은 기본 모양 */
html body .dy-cal-pop-months button.is-cur {
  height: 38px; padding: 0; border-radius: 12px; font-size: 0.93em; font-weight: 400;
  background: var(--dy-faint) !important; color: var(--dy-sub) !important;
  border: 1px solid color-mix(in srgb, var(--dy-text) 16%, transparent) !important; box-shadow: none;
}
html body .dy-cal-pop-months button.is-cur:hover {
  background: var(--dy-accent-soft) !important; color: var(--dy-sub) !important;
  border-color: color-mix(in srgb, var(--dy-accent) 45%, transparent) !important;
}
/* 나머지 월 버튼도 모서리 둥글기를 선택된 버튼과 통일 (12px) */
html body .dy-cal-pop-months button { border-radius: 12px; }
/* 캘린더 칸의 기분 아이콘: 배경 투명 */
.dy-cc .dy-cc-m, .dy-cc.has-img .dy-cc-m { background: transparent !important; }
/* 트윗의 장소: 태그 아래, 멘션·리트윗 버튼 줄 바로 위 */
.dy-tw-mt > .dy-loc, .dy-th-body > .dy-loc { margin: 8px 0 2px; }
/* 트윗 "날짜 · 장소" 줄 */
.dy-loc-meta { display: flex; flex-wrap: wrap; align-items: baseline; }
.dy-loc-meta .dy-loc-sep { white-space: pre; }
.dy-loc-meta .dy-loc-date, .dy-loc-meta .dy-loc-name > span { font-family: var(--dy-font); }
.dy-loc-meta .dy-loc-name { display: inline-flex; align-items: baseline; gap: 5px; }
.dy-loc-meta .dy-loc-name i { margin-right: 0; }
.dy-loc-meta a { margin-left: 0; }
/* 트윗 카드·멘션: 멘션/리트윗/기분 버튼 줄 위에 작성 박스처럼 가로줄 */
.dy-tw-act { border-top: 1px solid var(--dy-line); padding-top: 8px; margin-top: 8px; }
.dy-th-act { position: relative; padding-top: 8px; margin-top: 10px; }
.dy-th-act::before { content: ""; position: absolute; top: 0; left: 8px; right: 0; height: 1px; background: var(--dy-line); }
/* 기분: 버튼 줄의 오른쪽 끝에 배치 (나머지 버튼은 왼쪽부터) */
.dy-tw-act .dy-mood, .dy-th-meta .dy-mood { margin-left: auto; }
/* 트윗 "날짜 · 장소" 줄: 오른쪽 정렬 */
.dy-loc-meta { justify-content: flex-end; text-align: right; }
/* "위치 · 날짜 · N분 전" 줄: 모든 요소의 글자 크기를 줄 기준 하나로 통일 */
.dy-loc-meta, .dy-loc-meta span, .dy-loc-meta a, .dy-loc-meta .dy-loc-name > span { font-size: 1em; }
.dy-loc-meta { font-size: 0.86em; }
.dy-loc-meta i { font-size: 1em; }
/* 멘션(멘션) · 끌올/인용 버튼 사이 간격 넓힘 */
.dy-tw-act, .dy-th-act { gap: 32px; }
/* 멘션 · 끌올/인용 버튼 묶음을 오른쪽으로 살짝 이동 (기분은 오른쪽 끝 그대로) */
.dy-tw-act, .dy-th-act { padding-left: 12px; }
/* 기분을 고르지 않은 트윗: 기분 자리에 홈페이지 로고 */
.dy-mood-logo { display: inline-flex; align-items: center; }
.dy-mood-logo img { height: 22px; max-width: 64px; width: auto; object-fit: contain; opacity: 0.55; filter: none; }
/* 트윗 상세: 기분(또는 로고)도 목록처럼 버튼 줄의 오른쪽 끝에 */
.dy-th-act .dy-mood { margin-left: auto; font-size: 1.2em; }

/* 트윗: 태그(왼쪽)와 "위치 · 날짜"(오른쪽)를 같은 줄에 */
.dy-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; }
.dy-meta-row .dy-tw-tgs { margin: 0; flex: 1 1 auto; min-width: 0; }
.dy-meta-row .dy-th-meta { margin: 0; flex: 1 1 auto; min-width: 0; }
.dy-meta-row .dy-loc { margin: 0 0 0 auto; flex: 0 1 auto; }

/* ───────── 슬라이드/라이트박스 밝은색 버튼: a_scrap 의 .btn_bo_user li .btn 과 통일 (border · 글자 · 배경) ───────── */
.rx-lb, .dy-slider {
  --rx-bg: rgb(from var(--card-bg-color, #fffdf8) r g b / 50%);
  --rx-bg-hover: var(--dd-hover-bg, rgb(from var(--card-bg-color, #fffdf8) r g b / 80%));
  --rx-fg: var(--content-font-color, #3b3530);
  --rx-fg-hover: var(--content-font-color, #3b3530);
  --rx-border: var(--card-border-color, rgba(0, 0, 0, 0.12));
  --rx-border-hover: var(--accent-color, #b5704f);
}
.rx-lb .rx-lb-btn, .rx-lb .rx-lb-sq, .rx-lb .rx-sl-nav { font-size: 14px; line-height: 1; }
.dy-slider .dy-slider-arrow {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--rx-bg); color: var(--rx-fg);
  border: 1px solid var(--rx-border);
  box-shadow: none; font-size: 14px; line-height: 1;
}
.dy-slider .dy-slider-arrow:hover, .dy-slider .dy-slider-arrow:focus-visible { background: var(--rx-bg-hover); color: var(--rx-fg-hover); border-color: var(--rx-border-hover); }
.rx-lb .rx-lb-btn:hover { border-color: transparent; }
/* 사진 순서 칩(1 / N) 제거 */
.dy-slider .dy-slider-count { display: none !important; }
/* 슬라이더 위에서 돋보기 커서 사용 안 함 */
.dy-readpaper .dy-slide { cursor: pointer; }
.dy-cm-imgs i { cursor: pointer; }
/* 이동 버튼: 슬라이더 hover 시에만 표시 (터치 기기는 항상 표시) */
.dy-slider .dy-slider-arrow { opacity: 0; transition: opacity 0.15s ease, background 0.12s, color 0.12s; }
.dy-slider:hover .dy-slider-arrow, .dy-slider .dy-slider-arrow:focus-visible { opacity: 1; }
@media (hover: none) { .dy-slider .dy-slider-arrow { opacity: 1; } }
/* 점: 다른 스킨(OTT/basic)의 슬라이더 점과 같은 모양 */
.dy-slider .dy-slider-dots { gap: 6px; bottom: 12px; }
.dy-slider .dy-slider-dots .dy-slider-dot { width: 8px; height: 8px; border-radius: 50%; padding: 0; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); transform: none; }
.dy-slider .dy-slider-dots .dy-slider-dot.is-active { width: 8px; background: #fff; transform: scale(1.25); }

/* 트윗 상세보기 큰 이미지 화면: 점 대신 썸네일 박스 (다른 스킨과 같은 radius) */
.dy-slider.is-thumbs .dy-slider-dots {
  bottom: 12px; gap: 6px; padding: 4px; max-width: calc(100% - 32px); margin: 0 auto; overflow-x: auto; scrollbar-width: none;
  justify-content: safe center; pointer-events: auto;
}
.dy-slider.is-thumbs .dy-slider-dots::-webkit-scrollbar { display: none; }
.dy-slider.is-thumbs .dy-slider-dots .dy-slider-dot.rx-th {
  width: 44px; height: 44px; border-radius: 6px !important; padding: 0; flex: 0 0 auto; overflow: hidden;
  background: #2b2d31; border: 2px solid transparent; opacity: 0.6; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); transform: none;
}
.dy-slider.is-thumbs .dy-slider-dots .dy-slider-dot.rx-th:hover { opacity: 0.9; }
.dy-slider.is-thumbs .dy-slider-dots .dy-slider-dot.rx-th.is-active { width: 44px; opacity: 1; border-color: #fff; transform: none; }
.dy-slider.is-thumbs .dy-slider-dots .dy-slider-dot.rx-th img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.dy-slider.is-thumbs .dy-slider-dots .dy-slider-dot.rx-th img.is-spoiler { filter: blur(8px); }

/* 긴 일기 등 점 슬라이더: 예전 어두운 알약 배경/블러를 없애고 OTT·basic 과 같은 점만 남김 */
.dy-slider:not(.is-thumbs) .dy-slider-dots {
  left: 0; right: 0; transform: none; bottom: 12px; gap: 6px; padding: 0;
  background: none; border-radius: 0; border: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* 트윗 상세 썸네일 박스: 알약(999px) 대신 다른 스킨 썸네일 바와 같은 radius */
.dy-slider.is-thumbs .dy-slider-dots {
  left: 50%; right: auto; transform: translateX(-50%); width: max-content;
  background: var(--rx-bg, #1e1f22); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.dy-slider.is-thumbs .dy-slider-dots .dy-slider-dot.rx-th img { border-radius: 4px; }
/* 열람 권한이 없는 글의 달력 썸네일: 흐리게 (가장자리가 투명해지지 않도록 살짝 확대) */
.dy-cc { overflow: hidden; }
.dy-cc-img.is-blur { filter: blur(9px); transform: scale(1.2); }

/* 끌올·인용한 사람 보기 (chart-line 버튼 → 프사 + 닉네임 목록) */
.dy-who-menu { min-width: 190px; max-width: 280px; max-height: 260px; overflow-y: auto; padding: 6px; border-radius: 14px; }
.dy-who-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; color: var(--dy-text) !important; text-decoration: none !important; }
a.dy-who-item:hover { background: var(--dy-accent-soft); }
.dy-who-item .dy-who-av { width: 28px; height: 28px; min-width: 28px; flex: none; font-size: 12px; margin: 0; }
.dy-who-item .dy-who-av img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.dy-who-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.93em; }
.dy-who-t { flex: none; font-style: normal; font-size: 0.78em; color: var(--dy-sub); }

/* 버튼 줄: 가로선 길이는 카드 전체 그대로, 버튼 줄의 가로는 본문(.dy-tw-tx)과 같게 제한.
   양 끝 아이콘(왼쪽 끝 = 멘션, 오른쪽 끝 = 기분/로고)은 본문 양옆에 딱 붙임. 기분은 지금처럼 오른쪽 끝 */
.dy-tw-act { position: relative; border-top: 0; margin-left: calc(var(--dy-av, 44px) + var(--dy-avgap, 14px)); padding-left: 0; }
.dy-tw-act::before { content: ""; position: absolute; top: 0; left: calc(-1 * (var(--dy-av, 44px) + var(--dy-avgap, 14px))); right: 0; height: 1px; background: var(--dy-line); }
.dy-th-act { padding-left: 0; }
.dy-tw-act > :first-child, .dy-th-act > :first-child { padding-left: 0 !important; margin-left: 0 !important; }
html body .dy-tw-act .dy-thr, html body .dy-th-act .dy-thr { margin-left: 0 !important; padding-left: 0 !important; }
.dy-tw-act > :last-child, .dy-th-act > :last-child { padding-right: 0 !important; margin-right: 0 !important; }
.dy-tw-act > :last-child .dy-act, .dy-th-act > :last-child .dy-act { padding-right: 0; }

/* 끌올·인용한 사람 목록: 끌올 줄(div)과 인용 줄(a)의 모양을 똑같이 (일반 메뉴 항목의 가운데 정렬·왼쪽 아이콘 규칙이 인용 줄에만 걸리던 것을 되돌림) */
html body .dy-who-menu .dy-who-item,
html body .dy-who-menu a.dy-who-item {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; position: static;
  padding: 6px 8px; text-align: left; font-family: var(--dy-font); font-size: 1em; white-space: nowrap;
  color: var(--dy-text) !important; text-decoration: none !important; border-radius: 10px; cursor: default;
}
html body .dy-who-menu a.dy-who-item { cursor: pointer; }
html body .dy-who-menu .dy-who-item:hover { background: var(--dy-accent-soft); }
/* 끌올 + 인용 수: 그래프 아이콘 오른쪽 */
.dy-who-btn { gap: 5px; }
.dy-who-btn .dy-who-count { font-size: 0.86em; line-height: 1; }
.dy-rt-btn { gap: 5px; }
.dy-rt-btn .dy-who-count { font-size: 0.86em; line-height: 1; }

/* 끌올+인용 수: 멘션(멘션) 숫자와 같은 스타일 (같은 글자 크기 · 폰트 · 색 · 아이콘과의 간격) */
html body .dy-rt-btn .dy-who-count, html body .dy-who-btn .dy-who-count {
  font-size: inherit; font-family: inherit; font-weight: inherit; line-height: 1; color: inherit; letter-spacing: normal;
}
html body .dy-rt-btn, html body .dy-who-btn { font-family: inherit; gap: 5px; }

/* 끌올+인용 수 폰트: 멘션 수와 같은 폰트패밀리(.dy-wrap 본문 폰트 var(--dy-font))로 명시 */
html body .dy-rt-btn, html body .dy-who-btn,
html body .dy-rt-btn .dy-who-count, html body .dy-who-btn .dy-who-count,
html body .dy-thr span { font-family: var(--dy-font) !important; }

/* 멘션(멘션) 버튼: 끌올/인용 버튼처럼 안의 요소를 중앙 정렬.
   숫자가 없으면 정사각에 가까운 기본 크기(38px), 숫자가 있을 때만 폭이 늘어남.
   왼쪽 끝 밀착은 버튼 안쪽 여백을 줄이지 않고 버튼을 바깥으로 당겨서 처리 (아이콘이 버튼 가운데에서 벗어나지 않게) */
html body .dy-tw-act .dy-thr, html body .dy-th-act .dy-thr {
  box-sizing: border-box; width: auto; min-width: 38px; padding: 0 10px !important; margin-left: -10px !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
html body .dy-th-act > :first-child { margin-left: -10px !important; }
html body .dy-tw-act > :last-child .dy-act, html body .dy-th-act > :last-child .dy-act { padding-right: 10px; }
html body .dy-tw-act > .dy-menu-wrap:last-child, html body .dy-th-act > .dy-menu-wrap:last-child { margin-right: -10px !important; }
html body .dy-rt-wrap .dy-act, html body .dy-who-wrap .dy-act { justify-content: center; min-width: 38px; width: auto; }
.dy-who-empty { padding: 10px 12px; font-size: 0.9em; color: var(--dy-sub); white-space: nowrap; }

/* 버튼 줄: 멘션(왼쪽 끝)과 기분(오른쪽 끝)은 지금 위치 그대로, 그 사이의 끌올/인용 · 그래프 버튼은 간격을 균등하게 */
html body .dy-tw-act, html body .dy-th-act { justify-content: space-between; gap: 0; }
html body .dy-tw-act .dy-mood, html body .dy-th-act .dy-mood { margin-left: 0; }

/* 버튼 줄: 숫자(멘션·끌올/인용 수)가 있든 없든 아이콘의 열이 카드마다 똑같이 맞도록 칸 배치.
   목록 카드: [멘션][끌올/인용][그래프][기분] — 앞 세 칸은 같은 폭이고 아이콘은 각 칸의 왼쪽에서 시작(숫자는 오른쪽으로 늘어남),
   기분은 오른쪽 끝. 멘션 화면(멘션 없음): [끌올/인용][그래프][기분] */
html body .dy-tw-act { display: grid; grid-template-columns: 1fr 1fr 1fr auto; align-items: center; justify-content: stretch; column-gap: 0; }
html body .dy-th-act { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; justify-content: stretch; column-gap: 0; }
html body .dy-tw-act > .dy-thr { grid-column: 1; justify-self: start; }
html body .dy-tw-act > .dy-rt-wrap { grid-column: 2; justify-self: start; }
html body .dy-tw-act > .dy-who-wrap { grid-column: 3; justify-self: start; }
html body .dy-tw-act > .dy-mood { grid-column: 4; justify-self: end; }
html body .dy-th-act > .dy-rt-wrap { grid-column: 1; justify-self: start; }
html body .dy-th-act > .dy-who-wrap { grid-column: 2; justify-self: start; }
html body .dy-th-act > .dy-mood { grid-column: 3; justify-self: end; }

/* 아이콘 왼쪽 끝이 각 칸의 시작점에 오도록 (버튼 안쪽 여백만큼 당김) → 아이콘 사이 간격이 정확히 같아짐 */
html body .dy-tw-act > .dy-rt-wrap, html body .dy-tw-act > .dy-who-wrap,
html body .dy-th-act > .dy-rt-wrap, html body .dy-th-act > .dy-who-wrap { margin-left: -10px !important; }

/* 하트 버튼: 끌올/인용 버튼 오른쪽. 칸 배치에 넣고, 켜지면 하트가 채워지며 강조색 */
html body .dy-tw-act { grid-template-columns: 1fr 1fr 1fr 1fr auto; }
html body .dy-th-act { grid-template-columns: 1fr 1fr 1fr auto; }
html body .dy-tw-act > .dy-like-btn { grid-column: 3; justify-self: start; margin-left: -10px !important; }
html body .dy-tw-act > .dy-who-wrap { grid-column: 4; }
html body .dy-tw-act > .dy-mood { grid-column: 5; }
html body .dy-th-act > .dy-like-btn { grid-column: 2; justify-self: start; margin-left: -10px !important; }
html body .dy-th-act > .dy-who-wrap { grid-column: 3; }
html body .dy-th-act > .dy-mood { grid-column: 4; }
html body .dy-like-btn { box-sizing: border-box; height: 32px; min-width: 38px; padding: 0 10px; border-radius: 14px; gap: 5px; justify-content: center; font-family: var(--dy-font) !important; }
html body .dy-like-btn .dy-like-count { font-size: inherit; font-family: inherit; line-height: 1; color: inherit; }
html body .dy-like-btn.is-on, html body .dy-like-btn.is-on i { color: var(--dy-accent) !important; }
/* 하트(비어 있을 때) 라인 두께: 다른 아이콘(끌올 · 그래프 등)의 선 굵기에 맞춰 테두리를 덧그림 */
html body .dy-like-btn i.fa-regular { -webkit-text-stroke: 0.3px currentColor; paint-order: stroke fill; }
html body .dy-like-btn i.fa-solid { -webkit-text-stroke: 0; }
/* 내가 끌올/인용한 글: 리트윗 아이콘을 포인트색으로 */
html body .dy-rt-btn.is-mine, html body .dy-rt-btn.is-mine i, html body .dy-rt-btn.is-mine .dy-who-count { color: var(--dy-accent) !important; }
/* 리트윗 권한이 없는 사람: 버튼을 흐리게, 누를 수 없음 */
html body .dy-rt-btn.is-disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
/* 마음 버튼 권한(글 읽기 권한)이 없으면 흐리게, 누를 수 없음 */
html body .dy-like-btn.is-disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* 리트윗 버튼 하위 메뉴(끌올 · 인용): 글자를 오른쪽 정렬 (아이콘은 왼쪽 끝 그대로) */
html body .dy-rt-menu a, html body .dy-rt-menu button { justify-content: flex-end; text-align: right; padding-right: 16px; }

/* 리트윗 버튼 하위 메뉴: 가로 폭을 좁게 (아이콘 자리 + 글자 + 여백만큼) */
html body .dy-rt-menu { min-width: 0; width: auto; }
html body .dy-rt-menu a, html body .dy-rt-menu button { padding-left: 34px; padding-right: 12px; }
html body .dy-rt-menu a > i, html body .dy-rt-menu button > i { left: 10px; }

/* ───────── 긴 일기: 끌올/인용 · 마음 · 반응(그래프) 버튼 ───────── */
/* 목록의 일기 카드: 끌올 표시는 카드 맨 위 한 줄, 버튼 줄은 태그/댓글 수 아래 (카드 전체 링크 위로 올려 눌리게 함) */
.dy-entry > .dy-rt-label { grid-column: 1 / -1; grid-row: auto; margin: -6px 0 -6px 0; position: relative; z-index: 2; }
.dy-entry > .dy-rt-label .dy-rt-ico { width: auto; margin-right: 2px; }
.dy-entry-act, .dy-read-act { display: flex; align-items: center; gap: 28px; margin-top: 10px; position: relative; z-index: 2; }
.dy-entry-act > *, .dy-read-act > * { flex: none; }
.dy-entry-act > .dy-rt-wrap, .dy-read-act > .dy-rt-wrap, .dy-entry-act > .dy-who-wrap, .dy-read-act > .dy-who-wrap, .dy-entry-act > .dy-like-btn, .dy-read-act > .dy-like-btn { margin-left: 0; }
.dy-entry-act .dy-act, .dy-read-act .dy-act { box-sizing: border-box; height: 32px; min-width: 38px; padding: 0 10px; border-radius: 14px; gap: 5px; justify-content: center; }
.dy-entry-act .dy-act i, .dy-read-act .dy-act i { font-size: 17px; }
.dy-read-act { margin: 18px 0 6px; padding-top: 8px; border-top: 1px solid var(--dy-line); }
.dy-entry-act { margin-left: -10px; }
/* 일기 카드: 마음이 있을 때만 댓글 수 옆에 하트와 수 표시 */
.dy-cmt-count.dy-like-n i { font-size: 0.9em; }

/* 긴 일기 상세 아래 버튼 줄: 트윗 버튼 줄과 같은 모양 — [멘션][끌올/인용][마음][그래프] 같은 간격의 칸, 아이콘 열 고정
   ("멘션 N" 제목 대신 멘션 아이콘이 이 줄 맨 앞에 옴. 누르면 아래 멘션으로 이동) */
html body .dy-read-act { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; column-gap: 0; margin: 22px 0 8px; padding: 8px 0 0; border-top: 1px solid var(--dy-line); }
html body .dy-read-act > .dy-thr { grid-column: 1; justify-self: start; margin-left: -10px !important; }
html body .dy-read-act > .dy-rt-wrap { grid-column: 2; justify-self: start; margin-left: -10px !important; }
html body .dy-read-act > .dy-like-btn { grid-column: 3; justify-self: start; margin-left: -10px !important; }
html body .dy-read-act > .dy-who-wrap { grid-column: 4; justify-self: start; margin-left: -10px !important; }
html body .dy-read-act .dy-thr, html body .dy-read-act .dy-act {
  box-sizing: border-box; height: 32px; min-width: 38px; padding: 0 10px; border-radius: 14px; gap: 5px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.86em; line-height: 1;
}
html body .dy-read-act .dy-thr { color: var(--dy-sub) !important; }
html body .dy-read-act .dy-thr svg { width: 17px; height: 17px; stroke-width: 2.6; }
html body .dy-read-act .dy-thr span { font-family: var(--dy-font) !important; }
.dy-cmts { margin-top: 8px; }
/* 일기 상세 버튼 줄: 반응(그래프) 버튼은 오른쪽 끝에 붙임 — 앞의 세 칸은 같은 폭, 아이콘 사이 간격은 그대로 균등 */
html body .dy-read-act { grid-template-columns: 1fr 1fr 1fr auto; }
html body .dy-read-act > .dy-who-wrap { grid-column: 4; justify-self: end; margin-left: 0 !important; margin-right: -10px !important; }
/* 일기 상세 버튼 줄 안쪽 여백 */
html body .dy-read-act { padding: 12px 14px 4px; }
/* 답글 버튼: 글자 대신 멘션 아이콘 */
html body .dy-reply-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 12px; line-height: 1; }
html body .dy-reply-btn svg { width: 16px; height: 16px; stroke-width: 2.4; }
html body .dy-reply-btn:hover { background: var(--dy-accent-soft); }
/* 긴 일기 상세: 페이지 아래 여백 */
.dy-view-wrap { padding-bottom: 80px; }

/* 멘션 창(.dy-float): 본문이 멘션 목록에 밀려 한두 줄만 보이던 문제 —
   본문(.dy-th-body)은 줄어들지 않게 하고(너무 길면 창 높이의 30%까지만 보이고 그 안에서 스크롤),
   남는 높이를 멘션 목록(.dy-cmts)이 쓰며 필요하면 목록만 줄어들어 스크롤됨 */
.dy-float .dy-th-body { flex: 0 0 auto; min-height: 0; max-height: 30vh; overflow-y: auto; }
.dy-float .dy-cmts { flex: 1 1 auto; min-height: 96px; overflow-y: auto; }
/* 멘션(트윗 상세) 버튼 줄: 양옆 안쪽 여백 — 버튼이 창 가장자리에 달라붙지 않게 (전체를 같이 안쪽으로 옮겨 아이콘 간격은 그대로) */
html body .dy-th-act { padding-left: 14px; padding-right: 14px; }

/* ───────── 버튼 줄: 아이콘 "가운데" 사이 간격을 정확히 같게 ─────────
   버튼마다 아이콘 폭이 다르고 숫자가 붙으면 폭이 달라져서, 왼쪽 끝 기준 배치는 눈으로 보면 균등하지 않았음.
   → 모든 버튼을 같은 폭(38px)의 칸으로 만들고 아이콘을 칸 가운데에 고정, 숫자는 아이콘 오른쪽에 겹쳐 띄움(칸 폭에 영향 없음).
   칸들을 줄 전체에 균등 배치(space-between)하므로 아이콘 중심 사이 간격이 항상 같고, 숫자 유무와 상관없이 열이 맞음.
   양 끝 아이콘은 줄의 양끝에 닿도록 바깥쪽 여백만큼 당김 */
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) { display: flex; grid-template-columns: none; justify-content: space-between; align-items: center; column-gap: 0; gap: 0; }
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) > :is(.dy-thr, .dy-rt-wrap, .dy-like-btn, .dy-who-wrap, .dy-mood) {
  flex: none; width: 38px; min-width: 38px; margin: 0 !important; padding: 0 !important; justify-self: auto; grid-column: auto;
  display: inline-flex; align-items: center; justify-content: center; position: relative;
}
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) > :first-child { margin-left: -10px !important; }
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) > :last-child { margin-right: -10px !important; }
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) :is(.dy-rt-wrap, .dy-who-wrap) > .dy-act { width: 38px; min-width: 38px; padding: 0 !important; justify-content: center; position: relative; }
/* 숫자: 아이콘 오른쪽에 띄움 (칸 폭을 바꾸지 않음) */
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) :is(.dy-thr > span, .dy-like-count, .dy-rt-btn .dy-who-count) {
  position: absolute; left: calc(50% + 12px); top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
}
/* 기분 · 로고: 칸 안에 가운데 (로고는 칸보다 커지지 않게) */
html body :is(.dy-tw-act, .dy-th-act) > .dy-mood img, html body :is(.dy-tw-act, .dy-th-act) > .dy-mood .dy-mood-img { max-width: 34px; }

/* 볼 수 없는 비밀 멘션: 눌리지 않는 단순 메시지 (+ 비회원 댓글이면 비밀번호 입력칸) */
.dy-secret-msg { color: var(--dy-sub); font-size: 0.93em; cursor: default; user-select: none; }
.dy-secret-msg i { margin-right: 4px; }
.dy-secret-pw { display: flex; gap: 6px; align-items: center; margin-top: 8px; max-width: 280px; }
.dy-secret-pw .dy-input { flex: 1 1 auto; min-width: 0; height: 34px; }
.dy-secret-pw .dy-btn-sm { flex: none; }

/* 멘션(트윗 상세) 창: 버튼 줄은 스크롤되는 본문 밖에 따로 고정 — 인용 카드 등으로 본문이 길어도 버튼 줄이 가려지지 않음 */
.dy-th-act-wrap { flex: none; padding: 0 18px; border-top: 1px solid var(--dy-line); border-bottom: 1px solid var(--dy-line); }
.dy-float .dy-th-act-wrap { padding: 0 14px; }
.dy-th-body:has(+ .dy-th-act-wrap) { border-bottom: 0; }
.dy-th-act-wrap .dy-th-act { margin: 0; padding-top: 6px; padding-bottom: 6px; }
.dy-th-act-wrap .dy-th-act::before { display: none; }

/* 모바일 멘션 화면(이미지 없는 트윗): 본문이 길면(인용 카드 등) 아래 입력창이 화면 밖으로 밀려나던 문제 —
   본문은 화면 높이의 38%까지만 보이고 그 안에서 스크롤, 멘션 목록은 남는 높이를 쓰며 줄어듦. 입력창은 항상 맨 아래에 보임 */
@media (max-width: 768px) {
  .dy-thread.no-img .dy-th-body { flex: 0 1 auto; min-height: 90px; max-height: 38vh; overflow-y: auto; }
  .dy-thread.no-img .dy-cmts { flex: 1 1 auto; min-height: 70px; max-height: none; overflow-y: auto; }
  .dy-thread.no-img .dy-cinput { flex: none; }
}
/* 데스크톱 모달·떠 있는 창도 입력창이 밀리지 않도록 본문 최소 높이를 줄여 둠 */
.dy-thread.no-img .dy-th-body, .dy-float .dy-th-body { min-height: 90px; }
.dy-float .dy-cmts, .dy-thread.no-img .dy-cmts { min-height: 70px; }
.dy-float .dy-cinput, .dy-thread.no-img .dy-cinput { flex: none; }

/* ───────── 멘션 창(사진 없는 트윗 모달 · 떠 있는 창): 한 덩어리로 스크롤 + 입력창은 맨 아래에 고정 ─────────
   영역마다 줄어들게 하던 방식(본문/목록이 서로 밀어내며 입력창이 화면 밖으로 밀림)을 그만두고,
   창 전체가 하나로 스크롤되게 함. 본문·버튼 줄·멘션 목록은 제 크기대로 이어 붙고, 입력창만 아래에 달라붙어 항상 보임 */
html body :is(.dy-thread.no-img, .dy-float) .dy-tr { overflow-y: auto !important; overflow-x: hidden; overscroll-behavior: contain; }
html body :is(.dy-thread.no-img, .dy-float) .dy-tr > * { flex: none !important; }
html body :is(.dy-thread.no-img, .dy-float) .dy-th-body { max-height: none !important; overflow: visible !important; min-height: 0 !important; }
html body :is(.dy-thread.no-img, .dy-float) .dy-cmts { max-height: none !important; overflow: visible !important; min-height: 0 !important; }
html body :is(.dy-thread.no-img, .dy-float) .dy-cinput { position: sticky; bottom: 0; z-index: 5; background: var(--dy-card); box-shadow: 0 -1px 0 var(--dy-line); }

/* 입력 · 수정 버튼: 글자 대신 아이콘 (비밀번호 확인 버튼도 같은 모양) */
html body .dy-cinput .dy-cinput-submit, html body .dy-secret-pw .dy-secret-ok {
  box-sizing: border-box; height: 38px; min-width: 48px; padding: 0 16px; border-radius: 12px; border: none; box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.93em;
  background: color-mix(in srgb, var(--dy-text) 78%, var(--dy-card)) !important; color: var(--dy-card) !important; transition: background 0.2s ease;
}
html body .dy-secret-pw .dy-secret-ok i, html body .dy-cinput .dy-cinput-submit i { color: inherit; font-size: 15px; }
html body .dy-cinput .dy-cinput-submit:hover, html body .dy-secret-pw .dy-secret-ok:hover { background: var(--dy-accent) !important; filter: none; }
.dy-secret-pw .dy-secret-ok { flex: none; cursor: pointer; }

/* 멘션 입력창 안내 글자(placeholder) 색: 이름·비밀번호 입력칸과 같은 색으로 (스킨이 따로 정한 색을 걷어내고 브라우저 기본 안내 글자색을 같이 씀) */
html body .dy-cinput .dy-cinput-text::placeholder { color: revert; opacity: revert; }

/* 페이지 버튼: a_scrap 스킨의 페이지 버튼 스타일과 같게 (상단 버튼과 같은 모양, 현재 페이지는 포인트색) */
.pg_wrap { --dd-hover-bg: color-mix(in srgb, var(--btn-secondary-bg) 45%, transparent); }
.pg_wrap .pg { gap: 6px; }
.pg_wrap .pg_page,
.pg_wrap .pg_current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 34px;
    height: 34px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid var(--card-border-color);
    border-radius: 10px;
    background: rgb(from var(--card-bg-color) r g b / 50%);
    color: var(--content-font-color);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
    opacity: .9;
    transition: border-color .15s ease, background .15s ease, opacity .15s ease;
}
.pg_wrap .pg_page:hover,
.pg_wrap .pg_page:focus-visible { opacity: 1; color: var(--content-font-color); border-color: var(--accent-color); background: var(--dd-hover-bg); }
.pg_wrap .pg_page:hover:not(:active) { transform: none; }
.pg_wrap .pg_page:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.pg_wrap .pg_current { opacity: 1; color: var(--accent-color); border-color: var(--accent-color); background: color-mix(in srgb, var(--accent-color) 14%, transparent); font-weight: 700; }

/* 긴 일기 인용 카드: 목록의 일기 카드와 같은 모양 (날짜 칸 · 제목 · 요약 · 태그 · 사진). 인용 카드 크기에 맞춰 조금 작게 */
.dy-quote.dy-quote-diary { padding: 14px 16px; }
.dy-quote-entry { display: grid; grid-template-columns: 52px 1fr 76px; gap: 14px; align-items: start; pointer-events: none; }
.dy-quote-entry .dy-entry-dd { padding-right: 10px; }
.dy-quote-entry .dy-entry-dd b { font-size: 1.5em; }
.dy-quote-entry .dy-entry-body h3 { font-size: 1em; margin-bottom: 4px; }
.dy-quote-entry .dy-entry-body p { font-size: 0.88em; -webkit-line-clamp: 2; }
.dy-quote-entry .dy-entry-ph { width: 76px; height: 76px; align-self: center; }
@media (max-width: 480px) { .dy-quote-entry { grid-template-columns: 44px 1fr; } .dy-quote-entry .dy-entry-ph { display: none; } }
/* 썸네일이 없는 일기: 사진 자리(오른쪽 칸)까지 글이 이어서 보이게 */
.dy-entry.no-thumb { grid-template-columns: 70px 1fr; }
.dy-quote-entry.no-thumb { grid-template-columns: 52px 1fr; }
/* 목록·인용 카드의 일기 요약 속 이모티콘: 이미지로 보이되 전부 글자 크기에 맞춰 줄임 */
.dy-entry-body p img.ra0-emoticon, .dy-quote-entry p img.ra0-emoticon, img.dy-emo-mini { height: var(--ra0-emo-size, 1.6em) !important; width: auto !important; max-height: none !important; max-width: none !important; vertical-align: middle; margin: 0 1px; }
/* 인용 카드의 날짜 칸 세로선: 칸이 내용 높이에서 끊기지 않고 카드 높이만큼 이어지게 */
.dy-quote-entry .dy-entry-dd { align-self: stretch; }

/* ───────── 버튼 줄 hover 배경이 숫자까지 감싸게 ─────────
   (아이콘은 38px 칸 가운데에 고정하고 숫자는 오른쪽에 띄우는 구조라, 버튼 자체의 배경은 숫자를 못 감쌌음)
   → 버튼 배경은 쓰지 않고, 숫자 폭(--cw, JS가 잼)만큼 오른쪽으로 늘어나는 둥근 배경(::before)을 대신 그림 */
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) :is(.dy-thr, .dy-act):not(.is-disabled):hover { background: transparent !important; }
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) :is(.dy-thr, .dy-like-btn, .dy-rt-btn, .dy-who-btn) { isolation: isolate; }
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) :is(.dy-thr, .dy-like-btn, .dy-rt-btn, .dy-who-btn)::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; right: calc(-1 * (var(--cw, -5px) + 5px));
  border-radius: 14px; background: transparent; transition: background 0.15s ease; pointer-events: none;
}
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) :is(.dy-thr, .dy-like-btn, .dy-rt-btn, .dy-who-btn):not(.is-disabled):hover::before { background: var(--dy-accent-soft); }

/* 목록의 일기 카드: 멘션 수와 마음 수를 같은 크기·같은 높이 줄에 정렬 */
html body .dy-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; }
html body .dy-entry-meta .dy-cmt-count {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px; margin: 0 12px 0 0; height: 22px;
  font-size: 0.86em; line-height: 1; color: var(--dy-sub); font-family: var(--dy-font);
}
html body .dy-entry-meta .dy-cmt-count svg { width: 17px; height: 17px; flex: none; stroke-width: 2.6; }
html body .dy-entry-meta .dy-cmt-count.dy-like-n i { width: 17px; font-size: 15px; line-height: 1; text-align: center; flex: none; }
/* 숫자 위치: 아이콘 오른쪽 가까이(간격 약 5px). 배경(::before)은 숫자 오른쪽에도 왼쪽 여백과 같은 10px을 둠 */
html body :is(.dy-tw-act, .dy-th-act, .dy-read-act) :is(.dy-thr > span, .dy-like-count, .dy-rt-btn .dy-who-count) { left: calc(50% + 14px); }
/* 목록의 일기 카드: 태그 줄과 [멘션 수 · 마음 수] 줄을 따로 */
html body .dy-entry-meta .dy-entry-tgs { flex: 0 0 100%; }
html body .dy-entry-meta .dy-cmt-count:first-of-type { margin-top: 2px; }
/* 마음 수가 멘션 수보다 위로 올라가 보이던 것을 아래로 맞춤 (하트 글꼴 아이콘과 말풍선 그림의 세로 중심 차이 보정) */
html body .dy-entry-meta .dy-cmt-count.dy-like-n { position: relative; top: 2px; }
/* 글쓰기 화면: 글 박스(세로 flex)가 높이 제한(80vh)에 걸릴 때 안의 요소(트윗/긴 일기 전환 버튼 등)가 찌그러지지 않게 — 줄어들지 않고 박스가 스크롤됨 */
html body .dy-writepaper > *, html body .dy-write-ctl > *, html body .dy-write-ed > * { flex-shrink: 0; }
html body .dy-type-switch { min-height: 36px; flex: none; }

/* 멘션 창(떠 있는 창 · 전체 화면 모달)이 텍꾸 위젯의 선택 창 등 다른 팝업 위로 올라가 가리던 문제:
   멘션 창의 층 높이를 낮춰서(사이트 상단 메뉴 999보다만 위), 값이 더 높은 텍꾸 창이 항상 멘션 창보다 위에 뜨게 함 */
html body .dy-float, html body .dy-thread { z-index: 5000 !important; }
/* 미리보기 본문에 에디터 서식용 클래스(ra0-content)를 붙였으므로, 글자 모양은 읽기 화면(스킨) 그대로 유지 */
.dy-split-pane .dy-read-body.ra0-content { color: inherit; font-family: inherit; font-size: inherit; line-height: 2; }

/* 트윗 날짜 선택 줄 (📅 버튼으로 열기) */
.dy-tweet-date { display: none; gap: 8px; align-items: center; margin-top: 10px; }
.dy-tweet-date.is-open { display: flex; }
.dy-tweet-date .dy-input { width: 180px; flex: none; }

/* 상세에서 돌아왔을 때 해당 글 잠깐 강조 */
@keyframes dy-focus-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dy-accent) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.dy-tw.is-focus, .dy-entry.is-focus { animation: dy-focus-pulse 1.4s ease-out; }
/* 상세에서 돌아올 때: 위치가 맞춰질 때까지 목록을 숨김 */
html.dy-hold .dy-list-wrap, html.dy-hold .dy-pg-outer { visibility: hidden; }


/* 상세 오버레이: 열 때 페이드인, 닫을 때 페이드아웃 */
@keyframes dy-ov-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dy-ov-out { from { opacity: 1; } to { opacity: 0; } }
.dy-thread.is-overlay { animation: dy-ov-in 0.22s ease both; }
.dy-thread.is-overlay.is-closing { animation: dy-ov-out 0.2s ease both; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .dy-thread.is-overlay, .dy-thread.is-overlay.is-closing { animation: none; } }

/* 일기 읽기 오버레이: 화면 전체를 덮는 스크롤 칸 (닫을 때 페이드아웃은 트윗 상세 오버레이와 같음) */
.dy-detail-host { position: fixed; inset: 0; z-index: 5000; overflow-y: auto; overscroll-behavior: contain; background: var(--dy-bg); }
.dy-detail-host.is-overlay { animation: dy-ov-in 0.22s ease both; }
.dy-detail-host.is-overlay.is-closing { animation: dy-ov-out 0.2s ease both; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .dy-detail-host.is-overlay, .dy-detail-host.is-overlay.is-closing { animation: none; } }
.dy-detail-host .dy-view-wrap { animation: none; }
/* 일기 읽기 오버레이 배경: 이미지 없는 트윗 상세(모달)처럼 뒤의 목록이 비치는 반투명 어둠 */
.dy-detail-host { background: rgba(0, 0, 0, 0.55); cursor: pointer; }
.dy-detail-host .dy-view-wrap { cursor: auto; }

/* ───────── 일기 읽기 오버레이 레이아웃 ─────────
   컨테이너(읽기 종이)는 화면 높이의 80%만 차지. 날짜 줄(.dy-dateline)은 컨테이너 위쪽에 고정되고 나머지(제목 · 본문 · 멘션)만 스크롤.
   닫기(X) 버튼은 컨테이너 밖 아래쪽에 따로 둠 */
.dy-detail-host { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; overflow: hidden; }
html body .dy-detail-host .dy-view-wrap { flex: none; width: 100%; max-width: 860px; height: 80vh; margin: 0; padding: 0 16px; box-sizing: border-box; }
html body .dy-detail-host .dy-readpaper { height: 100%; display: flex; flex-direction: column; padding: 0; overflow: hidden; box-sizing: border-box; }
html body .dy-detail-host .dy-readpaper > .dy-dateline { flex: none; margin: 0 40px; padding-top: 26px; }
html body .dy-detail-host .dy-read-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 40px 28px; overscroll-behavior: contain; }
html body .dy-detail-host > .dy-closewrap { flex: none; margin: 0; }
@media (max-width: 768px) {
  html body .dy-detail-host .dy-readpaper > .dy-dateline { margin: 0 16px; padding-top: 20px; }
  html body .dy-detail-host .dy-read-scroll { padding: 14px 16px 22px; }
}

/* ───────── 일기 읽기 오버레이: 읽기 창 + 멘션창을 하나의 컨테이너로 ─────────
   .dy-dv-box 하나가 테두리 · 모서리 · 배경을 갖고, 안에 [읽기 창][멘션창]이 나란히 들어 있음 (둘 사이에 틈이 없음)
   · 컨테이너 높이는 화면의 80%, 읽기 창은 날짜 줄(위 고정) / 스크롤 / 버튼 줄(아래 고정)
   · 멘션창을 열면 컨테이너가 오른쪽으로 넓어지고 읽기 창은 줄어들며, 멘션창이 왼쪽→오른쪽으로 펼쳐짐 (닫을 땐 반대) */
.dy-detail-host { display: flex; align-items: center; justify-content: center; overflow: hidden; }
html body .dy-dv-box {
  display: flex; flex: none; box-sizing: border-box; height: 80vh; width: min(860px, calc(100vw - 32px)); overflow: hidden; cursor: auto;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); transition: width 0.28s ease;
}
html body .dy-detail-host.has-cm .dy-dv-box { width: min(1240px, calc(100vw - 32px)); }
html body .dy-dv-box .dy-view-wrap { flex: 1 1 auto; min-width: 0; width: auto; max-width: none; height: 100%; margin: 0; padding: 0; animation: none; }
html body .dy-dv-box .dy-readpaper { height: 100%; display: flex; flex-direction: column; padding: 0; margin: 0; overflow: hidden; box-sizing: border-box; background: none; border: 0; border-radius: 0; box-shadow: none; }
html body .dy-dv-box .dy-readpaper > .dy-dateline { flex: none; margin: 0 40px; padding-top: 26px; }
html body .dy-dv-box .dy-read-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 40px 28px; overscroll-behavior: contain; }
html body .dy-dv-box .dy-readpaper > .dy-read-act { flex: none; margin: 0 40px; padding: 8px 0 12px; border-top: 1px solid var(--dy-line); }
.dy-read-act a.dy-thr.is-open { color: var(--dy-accent) !important; }
/* 멘션창: 컨테이너 안의 오른쪽 칸 */
html body .dy-diary-cm.dy-wrap {
  position: static; flex: none; width: 0; max-width: none; height: 100%; margin: 0; padding: 0; display: block; overflow: hidden;
  background: none; border: 0; border-radius: 0; box-shadow: none; animation: none; transition: width 0.28s ease;
}
html body .dy-diary-cm.dy-wrap[hidden] { display: none; }
html body .dy-detail-host.has-cm .dy-diary-cm.dy-wrap { width: 380px; }
html body .dy-diary-cm-in { width: 380px; height: 100%; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden; cursor: auto; border-left: 1px solid var(--dy-line); background: none; border-radius: 0; }
.dy-diary-cm-hd { flex: none; padding: 14px 18px 10px; border-bottom: 1px solid var(--dy-line); font-family: var(--header-font-family, var(--dy-font)); }
.dy-diary-cm .dy-cmts { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; padding: 6px 18px; }
.dy-diary-cm .dy-cinput, .dy-diary-cm .dy-cinput-denied { flex: none; margin: 0; border: 0; border-top: 1px solid var(--dy-line); border-radius: 0; padding: 10px 14px 12px; }
/* 모바일: 멘션창은 컨테이너 위에 겹쳐서 왼쪽→오른쪽으로 드러남 */
@media (max-width: 768px) {
  html body .dy-dv-box { position: relative; }
  html body .dy-detail-host.has-cm .dy-dv-box { width: min(860px, calc(100vw - 32px)); }
  html body .dy-diary-cm.dy-wrap { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%); height: auto; z-index: 3; clip-path: inset(0 100% 0 0); transition: clip-path 0.28s ease; background: var(--dy-card); }
  html body .dy-detail-host.has-cm .dy-diary-cm.dy-wrap { width: min(380px, 100%); clip-path: inset(0); }
  html body .dy-dv-box .dy-readpaper > .dy-dateline { margin: 0 16px; padding-top: 20px; }
  html body .dy-dv-box .dy-read-scroll { padding: 14px 16px 22px; }
  html body .dy-dv-box .dy-readpaper > .dy-read-act { margin: 0 16px; }
}
@media (prefers-reduced-motion: reduce) { html body .dy-dv-box, html body .dy-diary-cm.dy-wrap { transition: none; } }

/* ───────── 이미지 없는 트윗 상세(모달): 읽기 칸 + 멘션창을 하나의 컨테이너로 ─────────
   일기 읽기 오버레이와 같은 방식: 컨테이너(.dy-nm-box) 하나가 테두리·모서리·그림자를 갖고, 멘션 버튼을 누르면 오른쪽으로 넓어지며 멘션창이 펼쳐짐 */
.dy-thread:not(.no-img) .dy-thr-toggle { display: none !important; }
html body .dy-thread.no-img .dy-nm-box {
  display: flex; align-items: stretch; box-sizing: border-box; width: min(640px, calc(100vw - 24px)); max-height: min(86vh, 780px); overflow: hidden; cursor: auto;
  background: var(--dy-card); border: 1px solid var(--dy-line); border-radius: var(--dy-radius); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); transition: width 0.28s ease;
}
html body .dy-thread.no-img.has-cm .dy-nm-box { width: min(1020px, calc(100vw - 24px)); min-height: min(520px, 86vh); }
html body .dy-thread.no-img .dy-nm-box .dy-tr {
  flex: 1 1 auto; min-width: 0; width: auto; max-width: none; height: auto; max-height: none; margin: 0; overflow: hidden !important;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
html body .dy-thread.no-img .dy-nm-box .dy-tr > .dy-th-body { flex: 1 1 auto !important; min-height: 0 !important; max-height: none !important; overflow-y: auto !important; }
html body .dy-thread.no-img .dy-nm-box .dy-tr > .dy-th-head, html body .dy-thread.no-img .dy-nm-box .dy-tr > .dy-th-act-wrap, html body .dy-thread.no-img .dy-nm-box .dy-tr > .dy-th-rt { flex: none !important; }
html body .dy-thread.no-img .dy-nm-box .dy-diary-cm.dy-wrap { height: auto; align-self: stretch; }
html body .dy-thread.has-cm .dy-diary-cm.dy-wrap { width: 380px; }
html body .dy-thread.no-img .dy-nm-box .dy-diary-cm-in { height: 100%; }
html body .dy-thread.no-img .dy-nm-box .dy-cmts { flex: 1 1 auto !important; min-height: 0 !important; max-height: none !important; overflow-y: auto !important; }
html body .dy-thread.no-img .dy-nm-box .dy-cinput { position: static; box-shadow: none; background: none; }
@media (max-width: 768px) {
  html body .dy-thread.no-img .dy-nm-box { position: relative; }
  html body .dy-thread.no-img.has-cm .dy-nm-box { width: min(640px, calc(100vw - 24px)); }
  html body .dy-thread.no-img .dy-nm-box .dy-diary-cm.dy-wrap { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%); height: auto; z-index: 3; clip-path: inset(0 100% 0 0); transition: clip-path 0.28s ease; background: var(--dy-card); }
  html body .dy-thread.no-img.has-cm .dy-nm-box .dy-diary-cm.dy-wrap { width: min(380px, 100%); clip-path: inset(0); }
}

/* 비밀글 체크박스: 텍꾸 체크박스와 같은 모양 (브라우저 기본 모양 대신 직접 그림, 체크하면 포인트색 바탕에 흰 체크) */
.dy-ck input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; display: inline-block; flex: none; box-sizing: border-box;
  width: 1.1em; height: 1.1em; margin: 0; vertical-align: -0.2em; cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--dy-text) 45%, transparent); border-radius: 3px;
  background: var(--dy-card) center / 80% no-repeat; opacity: 1; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.dy-ck input[type="checkbox"]:hover { border-color: var(--dy-accent); }
.dy-ck input[type="checkbox"]:checked {
  border-color: var(--dy-accent); background-color: var(--dy-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dy-ck input[type="checkbox"]:focus-visible { outline: 2px solid var(--dy-accent); outline-offset: 2px; }

/* 태그 · 위치를 (있을 때만) 하단 버튼 줄 바로 위에 고정 — 일기 읽기 오버레이, 이미지 없는 트윗 상세 */
html body .dy-pin-meta { flex: none !important; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding: 7px 40px; }
html body .dy-pin-meta .dy-read-tags, html body .dy-pin-meta .dy-th-meta, html body .dy-pin-meta .dy-tw-tgs { margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; }
html body .dy-pin-meta .dy-loc { margin: 0 0 0 auto; flex: 0 1 auto; }
html body .dy-thread.no-img .dy-nm-box .dy-tr > .dy-pin-meta { padding: 7px 18px; }
@media (max-width: 768px) { html body .dy-detail-host .dy-pin-meta { padding: 7px 16px; } }

/* 고정된 태그·위치 줄 뒤: 스크롤되는 글이 줄 위로 자연스럽게 사라지도록 위쪽으로 번지는 그라디언트 배경 (강하게) */
html body .dy-pin-meta { position: relative; z-index: 2; background: var(--dy-card); }
html body .dy-pin-meta::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 10px; pointer-events: none;
  background: linear-gradient(to top, var(--dy-card) 0%, var(--dy-card) 18%, color-mix(in srgb, var(--dy-card) 70%, transparent) 50%, transparent 100%);
}
/* 필터 초기화 칩: 필터 칩(.dy-tg)과 같은 모양, 아이콘만 (rotate-left) */
.dy-tg.dy-tg-reset { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.dy-tg.dy-tg-reset i { font-size: 0.85em; }
.dy-tg.dy-tg-reset { gap: 5px; }

/* 트윗 상세보기 큰 이미지 화면: 휠 확대/축소 + 확대 초기화 버튼(확대했을 때만 표시) */
.dy-slider.is-thumbs .dy-slide { transition: opacity .25s, transform .12s ease-out; }
.dy-slider.is-zoomed .dy-slide.is-active { cursor: grab; }
.dy-slider.is-panning .dy-slide.is-active { cursor: grabbing; transition: opacity .25s; }
.dy-slider .dy-slider-reset {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 10px;
  background: var(--rx-bg); color: var(--rx-fg); border: 1px solid var(--rx-border);
  box-shadow: none; cursor: pointer; font-size: 14px; line-height: 1;
}
.dy-slider .dy-slider-reset:hover, .dy-slider .dy-slider-reset:focus-visible { background: var(--rx-bg-hover); color: var(--rx-fg-hover); border-color: var(--rx-border-hover); }
.dy-slider .dy-slider-reset[hidden] { display: none !important; }

/* ───────── 사진 있는 트윗 상세(오른쪽 단): 본문 길이 제한 없음 ─────────
   작성자 줄(.dy-th-head)은 맨 위, 멘션 입력창은 맨 아래에 고정하고, 그 사이(본문 · 버튼 줄 · 멘션 목록)는 하나로 이어져서 함께 스크롤 */
html body .dy-thread:not(.no-img) .dy-tr { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
html body .dy-thread:not(.no-img) .dy-tr > * { flex: none; }
html body .dy-thread:not(.no-img) .dy-th-body { max-height: none; overflow: visible; }
html body .dy-thread:not(.no-img) .dy-cmts { flex: none; max-height: none; min-height: 0; overflow: visible; }
html body .dy-thread:not(.no-img) .dy-th-head { position: sticky; top: 0; z-index: 6; background: var(--dy-card); }
html body .dy-thread:not(.no-img) .dy-tr > .dy-cinput { position: sticky; bottom: 0; z-index: 6; margin-top: auto; background: var(--dy-card); }
/* (스포일러 이미지를 켜고 끌 때의 확대 효과는 위의 .dy-slide[data-spoiler] 규칙에서 transform: none 으로 이미 없앰 — 휠 확대(인라인 transform)를 막지 않도록 !important 는 쓰지 않음) */

/* 텍꾸 [ ] 안에서 Shift+Enter 로 바꾼 줄 보이기: 줄바꿈 글자를 그대로 보여줌 (공백은 평소처럼 접힘) */
.dy-wrap [class*="textggu--"], .dy-thread [class*="textggu--"], .dy-float [class*="textggu--"] { white-space: pre-line; }

/* 사진이 5장 이상일 때 네 번째 칸의 "+N": 그 사진이 스포일러여도 "눌러서 보기" 표시는 없애고 흐림만 유지 (+N 이 먼저 보이게) */
.dy-imgs i[data-more] .dy-spoiler-badge { display: none; }

/* 상세 오버레이는 사이트의 위젯 버튼 · 바(z-index 99999 안팎)보다 위에 뜨게 층 높이를 높임.
   (텍꾸 위젯 메뉴 100030 · 확대 보기(라이트박스) 20억 · 오버레이 안의 메뉴는 오버레이보다 위 / 안쪽에 있어 그대로 보임) */
html body .dy-thread.is-overlay, html body .dy-detail-host.is-overlay { z-index: 100005 !important; }
/* 목록 트윗의 이미지 박스: 프로필 사진 칸까지 가로로 펼치지 않고, 본문 글(.dy-text)과 같은 가로(오른쪽 칸)에 맞춤 */
.dy-tw > .dy-imgs { grid-column: 2; }
/* 주소를 직접 열어 보는 트윗 상세 페이지(오버레이 아님)도 같은 층 높이로: 위젯 버튼 · 바보다 위에 뜸 (오른쪽 아래 작은 멘션 창은 5000 유지) */
html body .dy-thread { z-index: 100005 !important; }

/* 트윗 본문 속 {N} 이미지 */
.dy-inline-img { display: block; position: relative; margin: 8px 0; width: 100%; max-width: none; border-radius: 12px; overflow: hidden; }
.dy-inline-img img { display: block; max-width: 100%; height: auto; cursor: pointer; }
.dy-inline-img.dy-spoiler img { cursor: pointer; }
/* 트윗 본문 {N} 이미지: 본문 가로를 전부 차지 + 눌러서 확대 보기 */
.dy-inline-img img { width: 100%; height: auto; cursor: pointer; }
/* 이어 쓴 {N}{N}{N} → 이미지 슬라이더 (읽기 화면의 슬라이더와 같은 모양) */
.dy-inline-slider { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; margin: 8px 0; border-radius: 12px; overflow: hidden; background: var(--dy-faint); }
.dy-inline-slider .dy-slides { position: absolute; inset: 0; }
.dy-inline-slider .dy-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; margin: 0; border-radius: 0; cursor: pointer; }

/* 첨부 이미지 순서 드래그 */
.dy-up-tile[draggable="true"] { cursor: grab; }
.dy-up-tile.is-dragging { opacity: .35; cursor: grabbing; }

/* 캘린더 보기: 기분 아이콘 배치 */
.dy-cc:not(.has-img) > .dy-cc-m { position: absolute; inset: 0; align-items: center; justify-content: center; }   /* 이미지 없이 기분만 있을 때: 칸 중앙 */
.dy-cc-ms { position: absolute; z-index: 1; right: 6px; bottom: 6px; display: flex; align-items: center; }   /* 기분이 여러 개: 오른쪽 아래에 겹쳐서 */
.dy-cc .dy-cc-ms .dy-cc-m, .dy-cc.has-img .dy-cc-ms .dy-cc-m { position: static; right: auto; bottom: auto; width: 24px; height: 24px; font-size: 18px; align-items: center; margin-left: -10px; background: transparent; }
.dy-cc .dy-cc-ms .dy-cc-m:first-child, .dy-cc.has-img .dy-cc-ms .dy-cc-m:first-child { margin-left: 0; }
.dy-cc .dy-cc-ms .dy-cc-m .dy-mood-img, .dy-cc.has-img .dy-cc-ms .dy-cc-m .dy-mood-img { width: 22px; height: 22px; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)) drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
@media (max-width: 640px) {
  .dy-cc-ms { right: 3px; bottom: 3px; }
  .dy-cc .dy-cc-ms .dy-cc-m, .dy-cc.has-img .dy-cc-ms .dy-cc-m { width: 18px; height: 18px; font-size: 13px; margin-left: -8px; }
  .dy-cc .dy-cc-ms .dy-cc-m .dy-mood-img, .dy-cc.has-img .dy-cc-ms .dy-cc-m .dy-mood-img { width: 16px; height: 16px; }
}

/* 이미지 없이 기분만 있는 칸: 가운데 기분 아이콘을 크게 */
.dy-cc:not(.has-img) > .dy-cc-m { font-size: 2.9em; }
.dy-cc:not(.has-img) > .dy-cc-m .dy-mood-img { width: 1.15em; height: 1.15em; }
@media (max-width: 640px) { .dy-cc:not(.has-img) > .dy-cc-m { font-size: 2em; } }
