@font-face {
  font-family: "Galmuri14";
  src: url("./images/Galmuri14.ttf") format("truetype");
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Mabinogi";
  src: url("./images/Mabinogi_Classic_TTF.ttf") format("truetype");
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Tangba";
  src: url("./images/TangbaMono12.ttf") format("truetype");
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "MaruMinya";
  src: url("./images/x12y12pxMaruMinyaHangul.ttf") format("truetype");
  font-weight: 400;
  font-display: block;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family:
    var(--font-user, "Galmuri14"),
    "Pretendard",
    -apple-system,
    sans-serif;
  font-size: var(--fs-base, 12px);
  color: var(--text, #191818);
  background: #ffffff;
  min-height: 100vh;
}

a {
  color: var(--text, #191818);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.post-body blockquote[data-ke-style="style2"] {
  border-left: solid 4px var(--accent, #ec3013);
  font-size: var(--fs-base, 12px);
  padding-left: 20px;
}

.post-body blockquote[data-ke-style="style3"] {
  border: solid 1px var(--accent, #ec3013) !important;
  font-size: var(--fs-base, 12px);
  background-color: color-mix(in srgb, var(--accent, #ec3013) 10%, transparent) !important;
  color: var(--text, #191818) !important;
}

.aside a {
  color: var(--accent, #ec3013);
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font-family: inherit;
}

.os-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 56px 20px 74px;
}

/* ---- main window ---- */
.section-label {
  margin-bottom: 16px;
}

.window {
  width: min(860px, 94vw);
  max-height: calc(100vh - 130px);
  background: #ffffff;
  border: 1px solid var(--text, #191818);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 20;
}

.window.is-maximized {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: calc(100vh - 38px);
  max-height: none;
  z-index: 20;
}

.window.is-minimized {
  display: none;
}

.window.is-focused {
  z-index: 30;
}

.titlebar {
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--divider, #e3e1e0);
  cursor: move;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots.dots-mac .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--text);
  cursor: pointer;
}

.spacer {
  flex: 1;
}

.topbar {
  height: 34px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  border-bottom: 1px solid var(--divider);
  font-size: var(--fs-base, 12px);
}

.cat-bar {
  display: flex;
  align-items: center;
  height: 100%;
}

.cat-bar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  height: 100%;
  align-items: center;
}

.cat-bar li {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.cat-bar li>a {
  opacity: 0.8;
  cursor: pointer;
}

.cat-bar li.cat-active>a {
  font-weight: 600;
  opacity: 1;
}

.cat-bar li ul {
  display: none;
}

.cat-bar ul.cat-dropdown,
.cat-bar ul.cat-flyout {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  width: 180px;
  background: #fff;
  border: 1px solid var(--text);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06);
  flex-direction: column;
  align-items: stretch;
  height: auto;
}

.cat-bar ul.cat-dropdown li,
.cat-bar ul.cat-flyout li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: auto;
  padding: 0;
}

.cat-bar ul.cat-dropdown a,
.cat-bar ul.cat-flyout a {
  display: block;
  padding: 6px 14px;
  opacity: 0.85;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.cat-bar li.cat-drop>ul.cat-dropdown {
  display: none;
  position: absolute;
  top: 30px;
  left: 0;
  z-index: 10;
}

.cat-bar li.cat-drop.cat-open>ul.cat-dropdown {
  display: flex;
  gap: 0px;
}

.cat-caret {
  display: inline-block;
  margin-left: 3px;
  font-size: var(--fs-base, 12px);
  opacity: 0.6;
  cursor: pointer;
}

.cat-bar ul.cat-dropdown li.has-sub,
.cat-bar ul.cat-flyout li.has-sub {
  position: relative;
}

.flyout-caret {
  display: inline-block;
  padding-right: 12px;
  opacity: 0.5;
  font-size: var(--fs-base, 12px);
}

.cat-bar li.has-sub>ul.cat-flyout {
  display: none;
  position: absolute;
  top: -7px;
  left: 100%;
  z-index: 11;
}

.cat-bar li.has-sub:hover>ul.cat-flyout,
.cat-bar li.has-sub.flyout-open>ul.cat-flyout {
  display: flex;
}

.tab-group {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.tab-toggle {
  cursor: pointer;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mobile-bar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 4px;
  margin: 0;
  cursor: pointer;
  color: var(--text);
  opacity: 0.8;
}

.tab-panel {
  display: none;
  position: absolute;
  top: 30px;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--text);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06);
  z-index: 10;
  padding: 12px;
  font-size: var(--fs-base, 12px);
}

.tab-panel-right {
  left: auto;
  right: 0;
}

.tab-panel.open {
  display: block;
}

.search-form {
  display: flex;
}

.search-input {
  border: 1px solid var(--divider);
  padding: 6px 8px;
  font-size: var(--fs-base, 12px);
  font-family: inherit;
  outline: none;
  width: 160px;
}

.window-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.content-scroll {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.aside {
  width: 170px;
  flex-shrink: 0;
  padding: 22px 16px;
  border-left: 1px solid var(--divider);
  overflow: auto;
}

#tt-body-page .aside {
  display: none;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--divider) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--divider);
  border: 2px solid #fff;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text);
}

.section {
  margin-bottom: 26px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-base, 12px);
  margin-bottom: 16px;
  opacity: 0.85;
}

.breadcrumb .sep {
  opacity: 0.4;
  margin: 0 3px;
}

/* intro cover */
.intro-section {
  text-align: var(--intro-align, center);
  padding-bottom: 22px;
}

.thumb-fallback {
  display: none;
}

.hero-image {
  display: inline-block;
  width: 70%;
  margin-bottom: 18px;
  background: #f4f4f4;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-content {
  font-size: var(--fs-base, 12px);
}

/* recent grid */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.grid-card {
  display: block;
}

.grid-thumb {
  display: block;
  width: 100%;
  height: 120px;
  margin-bottom: 6px;
  background: #f4f4f4;
  overflow: hidden;
}

.grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: var(--fs-base, 12px);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

.grid-date {
  display: block;
  font-size: var(--fs-base, 12px);
  opacity: 0.5;
  margin-top: 2px;
}

.recent-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 64px;
  color: var(--text);
}

.icon-card .dicon-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* list */
.post-list.list {
  display: flex;
  flex-direction: column;
}

.post-row {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  color: var(--text);
}

.post-thumb {
  display: none;
}

.post-video {
  display: none;
}

.post-icon-item {
  display: none;
}

.post-list.icons {
  display: flex;
  flex-wrap: wrap;
  row-gap: 20px;
  column-gap: 12px;
}

.post-list.icons .post-row {
  width: 64px;
  padding: 0;
  border-bottom: none;
}

.post-list.icons .post-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  color: var(--text);
}

.post-list.icons .post-thumb,
.post-list.icons .post-video,
.post-list.icons .post-info {
  display: none;
}

.post-list.icons .dicon-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.post-list.mix {
  display: flex;
  flex-direction: column;
}

.post-list.mix .post-row {
  flex-direction: row;
  gap: 14px;
  align-items: center;
}

.post-list.mix .post-thumb {
  display: block;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  background: #f4f4f4;
  overflow: hidden;
}

.post-list.mix .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-list.mix .post-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.post-list.mix .post-title-text {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.post-list.mix .post-excerpt {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.post-list.playlist {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-list.playlist .post-row {
  padding: 0;
  border-bottom: none;
  cursor: default;
}

.post-list.playlist .post-row:hover {
  text-decoration: none;
}

.post-list.playlist .post-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f4f4f4;
  overflow: hidden;
}

.post-list.playlist .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-list.playlist .post-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.post-list.playlist .post-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.post-list.playlist .post-row.has-video .post-thumb {
  display: none;
}

.post-list.playlist .post-row.has-video .post-video {
  display: block;
}

.post-list.playlist .post-info {
  margin-top: 8px;
}

.post-list.playlist .post-title-text {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.post-list.playlist .post-date,
.post-list.playlist .post-excerpt {
  display: none;
}

/* gallery */
.post-list.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.post-list.gallery .post-row {
  padding: 0;
  border-bottom: none;
}

.post-list.gallery .post-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f4f4f4;
  overflow: hidden;
}

.post-list.gallery .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-list.gallery .post-info {
  margin-top: 8px;
  text-align: center;
}

.post-list.gallery .post-date,
.post-list.gallery .post-excerpt {
  display: none;
}

/* memo */
.post-list.memo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.post-list.memo .post-row {
  padding: 14px;
  border: 1px solid var(--divider);
}

.post-list.memo .post-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-list.memo .post-title-text {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.post-list.memo .post-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  line-clamp: 8;
  -webkit-box-orient: vertical;
  white-space: normal;
  margin-top: 4px;
  overflow: hidden;
}

.post-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: var(--fs-base, 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  margin-bottom: 2px;
}

.post-date {
  font-size: var(--fs-base, 12px);
  opacity: 0.5;
  margin-top: 3px;
}

.post-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: var(--fs-base, 12px);
  line-height: 1.4;
  opacity: 0.65;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* post detail */
.post-title {
  font-size: var(--fs-title, 14px);
  font-weight: 800;
  margin: 0 0 8px;
}

.meta-date {
  font-size: var(--fs-base, 12px);
  opacity: 0.55;
  margin-bottom: 20px;
}

.post-body {
  font-size: var(--fs-base, 12px);
  line-height: 1.75;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.post-body img,
.post-body video,
.post-body iframe {
  max-width: 100%;
  height: auto;
}

.post-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.post-body pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}

.post-body code {
  overflow-wrap: anywhere;
}

/* protected (password-locked) post entry form */
.protected-form {
  display: flex;
  max-width: 320px;
  margin-top: 4px;
}

.protected-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--text, #191818);
  border-right: none;
  padding: 9px 12px;
  font-size: var(--fs-base, 12px);
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
  border-radius: 0;
  appearance: none;
}

.protected-input::placeholder {
  color: var(--text-tertiary, #8a8785);
}

.protected-input:focus {
  background: var(--divider, #e3e1e0);
}

.protected-submit {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--text, #191818);
  background: var(--text, #191818);
  color: #fff;
  font-size: var(--fs-base, 12px);
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
}

.protected-submit:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
  font-size: var(--fs-base, 12px);
}

.post-nav-link {
  opacity: 0.8;
}

/* pin "다음 글" to the right regardless of whether "이전 글" is present,
   instead of relying on space-between (which collapses to the left with
   1 child) — same fix already applied to .pagination-next */
.post-nav-next {
  margin-left: auto;
}

.comments-section {
  padding-top: 6px;
}

.post-comments {
  font-size: var(--fs-base, 12px);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  border: 1px solid var(--divider);
  padding: 5px 10px;
  font-size: var(--fs-base, 12px);
  color: var(--text);
}

.tag-chip:hover {
  border-color: var(--text);
}

.guestbook-body {
  font-size: var(--fs-base, 12px);
}

.pagination {
  display: flex;
  margin-top: 24px;
  font-size: var(--fs-base, 12px);
}

.pagination-link {
  color: var(--text);
  opacity: 0.8;
}

.pagination-next {
  margin-left: auto;
}

.pagination-link[data-no-more]:not([data-no-more=""]) {
  display: none;
}

.site-footer {
  text-align: center;
  font-size: var(--fs-base, 12px);
  opacity: 0.4;
  padding-top: 20px;
}

/* Comments toggle + widget (underline style) */
.comments-section {
  margin-top: 40px;
}

/* Comments toggle */
.comments-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 4px 0;
  margin: -4px 0;
  user-select: none;
}

.comments-toggle .section-label {
  margin-bottom: 0;
  pointer-events: none;
}

.comments-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.comments-panel.open {
  max-height: none;
  opacity: 1;
  margin-top: 28px;
}

.tt-box-total,
.post-comments .tt-box-total,
.post-comments .tt_box_cheers,
.editorial-comments .tt-box-total {
  display: none;
}

.tt-comment-cont,
.tt-comment-cont *,
.post-comments {
  font-family:
    var(--font-user, "Galmuri14"),
    "Pretendard",
    -apple-system,
    sans-serif !important;
  font-size: var(--fs-base, 12px) !important;
}

.tt-wrap-cmt .tt-box-content .tt-wrap-desc {
  border: solid 1px var(--text, #191818);
  border-radius: 20px 20px 20px 0px;
  padding: 16px;
}

.tt-wrap-info .tt_date+.tt-wrap-link-comment:before {
  display: none;
}


.tt-wrap-cmt .tt_date {
  padding-top: 4px;
}

.tt_item_modify .tt_desc,
.tt_item_modify .tt_desc_more,
.tt_item_secret>.tt-wrap-cmt .tt_desc {
  color: var(--text, #191818);
}

.tt-list-reply-comment .tt-item-reply .tt-wrap-cmt .tt-box-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.tt-list-reply-comment .tt-item-reply .tt-wrap-cmt .tt-box-content .tt-box-meta {
  display: none;
}

.tt-list-reply-comment .tt-item-reply .tt-wrap-cmt .tt-box-content .tt-wrap-desc {
  border: solid 1px var(--text, #191818);
  border-radius: 20px 20px 0px 20px;
  padding: 16px;
}

.tt-wrap-cmt {
  padding: 6px 0px;
  font-size: var(--fs-base, 12px);
}

.post-comments .tt-area-write .tt-box-account,
.editorial-comments .tt-area-write .tt-box-account {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.post-comments .tt-area-write .tt-box-account input:focus,
.editorial-comments .tt-area-write .tt-box-account input:focus,
.post-comments .tt-box-textarea .tt-inner-g:focus,
.editorial-comments .tt-box-textarea .tt-inner-g:focus {
  border-bottom-color: var(--text);
}

.guestbook-body .tt-area-write,
.post-comments .tt-area-write {
  padding-right: 60px;
}

.post-comments .tt-list-reply,
.editorial-comments .tt-list-reply {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tt-item-reply {
  border-top: none;
  padding: 6px 0px;
}

.post-comments .tt-item-reply::before,
.tt-item-reply .tt-item-reply::before {
  display: none;
}

.post-comments .tt-thumbnail,
.editorial-comments .tt-thumbnail,
.tt-box-thumb {
  display: none;
}

.post-comments .tt-link-user,
.editorial-comments .tt-link-user {
  font-size: var(--fs-base, 12px);
  font-weight: 500;
  color: var(--text);
}

.post-comments .tt_date,
.editorial-comments .tt_date {
  font-size: 11px;
  color: var(--text-tertiary);
}

.post-comments .tt_desc,
.editorial-comments .tt_desc {
  font-size: var(--fs-base, 12px);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 4px;
}

.tt-xe-input-helper {
  display: none;
}

.tt-btn_register {
  appearance: none;
  border: none;
  background: var(--text);
  color: #ffffff;
  padding: 7px 16px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border-radius: 0px;
  margin-left: 20px;
}

.tt-btn-cancel {
  margin-right: 0px;
  padding: 0;
}

.tt-item-reply .tt-btn_register {
  margin-left: 0;
}

.tt-link-comment .tt_txt_g {
  font-size: 11px;
  padding-top: 4px;
}

.tt-btn_register:hover {
  background: var(--accent);
  border: none;
}

.post-comments .tt-list-reply-comment {
  padding: 0 0 0 24px;
}

.tt-item-reply .tt-list-reply-comment {
  border-top: none;
  margin: 0px;
}

[data-tistory-react-app="Namecard"],
.tt_box_namecard {
  display: none !important;
}

.container_postbtn {
  display: none !important;
}

.another_category {
  display: none !important;
}

/* ---- widgets ---- */
.widget {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--divider);
  font-size: var(--fs-base, 12px);
}

.widget:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.counter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0.75;
}

.mini-player {
  position: fixed;
  right: 20px;
  bottom: 54px;
  width: 200px;
  z-index: 22;
}

.mini-player-main {
  position: relative;
  background: #fff;
  border: 1px solid var(--text);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 10px;
}

.mini-player-popup {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 8px;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--text);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06);
}

.playlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.now-title {
  font-size: var(--fs-base, 12px);
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.now-title-track {
  display: inline-flex;
  white-space: nowrap;
}

.now-title-track span {
  padding-right: 32px;
}

.now-title.is-overflowing .now-title-track {
  animation: now-title-marquee linear infinite;
}

@keyframes now-title-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.icon-btn {
  cursor: pointer;
  display: inline-flex;
  opacity: 0.75;
}

.player-toggle .icon-pause {
  display: none;
}

.player-toggle.is-playing .icon-play {
  display: none;
}

.player-toggle.is-playing .icon-pause {
  display: inline-flex;
}

.progress-track {
  height: 2px;
  background: var(--divider);
  margin-bottom: 9px;
  position: relative;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.playlist-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.calendar-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 3px;
  font-size: var(--fs-base, 12px);
  text-align: center;
}

.calendar-grid .wd {
  opacity: 0.5;
  font-size: var(--fs-base, 12px);
  margin-bottom: 2px;
}

.calendar-grid .day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0.75;
}

.calendar-grid .day.today {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  opacity: 1;
}

.donut-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.donut {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--text) 0deg 360deg);
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: var(--fs-base, 12px);
}

.donut-legend .leg-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.donut-legend .sw {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
}

.weather-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.weather-body {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.weather-temp {
  font-size: var(--fs-title, 14px);
  font-weight: 700;
}

.weather-desc {
  opacity: 0.65;
}

/* ---- todo widget ---- */
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-base, 12px);
}

.todo-check {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border: 1px solid var(--text);
  border-radius: 50%;
}

.todo-item.todo-done .todo-check {
  background: var(--text);
}

.todo-text {
  overflow-wrap: anywhere;
}

.todo-item.todo-done .todo-text {
  text-decoration: line-through;
  opacity: 0.5;
}

/* ---- desktop icons ---- */
.desktop-icons {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
}

.dicon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  width: 64px;
  color: var(--text);
}

.dicon-box {
  width: 40px;
  height: 40px;
  border: 1px solid var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}

.dicon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.dicon-box.has-custom-img .dicon-img {
  display: block;
}

.dicon-box.has-custom-img .dicon-fallback {
  display: none;
}

.dicon-label {
  font-size: var(--fs-base, 12px);
  text-align: center;
}

/* ---- taskbar ---- */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: #fff;
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  z-index: 40;
}

.taskbar-item {
  cursor: pointer;
  font-size: var(--fs-base, 12px);
  padding: 6px 10px;
}

.taskbar-item.active {
  background: var(--text);
  color: #fff;
}

.taskbar-credit {
  margin-left: auto;
  font-size: var(--fs-base, 12px);
  color: var(--text);
  opacity: 0.5;
  padding: 6px 4px;
  white-space: nowrap;
}

.taskbar-credit:hover {
  opacity: 0.85;
  text-decoration: none;
}

.taskbar-clock {
  font-size: var(--fs-base, 12px);
  opacity: 0.75;
  padding: 6px 4px;
  white-space: nowrap;
}

/* ---- floating windows ---- */
.float-window[hidden] {
  display: none;
}

.float-window {
  position: fixed;
  width: 220px;
  background: #fff;
  border: 1px solid var(--text);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06);
  z-index: 21;
  display: flex;
  flex-direction: column;
}

.float-titlebar {
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--divider);
  gap: 8px;
  cursor: move;
}

.float-title {
  font-size: var(--fs-base, 12px);
  font-weight: 600;
  flex: 1;
}

.memo-body {
  padding: 14px;
  font-size: var(--fs-base, 12px);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.playlist-tracks {
  padding: 8px 0;
}

.playlist-tracks .track-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: var(--fs-base, 12px);
}

.playlist-tracks .track-row.current {
  background: var(--text);
  color: #fff;
}

.playlist-tracks .track-title {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.track-title-track {
  display: inline-flex;
  white-space: nowrap;
}

.track-title-track span {
  padding-right: 24px;
}

.track-title.is-overflowing .track-title-track {
  animation: now-title-marquee linear infinite;
}

.ico-13 {
  width: 13px;
  height: 13px;
}

.ico-14 {
  width: 14px;
  height: 14px;
}

.ico-16 {
  width: 16px;
  height: 16px;
}

.ico-18 {
  width: 18px;
  height: 18px;
}

/* ==== mobile ==== */
@media (max-width: 720px) {
  .os-shell {
    padding: 0;
    align-items: stretch;
  }

  .window {
    width: 100vw;
    max-width: 100vw;
    max-height: none;
    height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .window.is-maximized {
    height: 100vh;
  }

  .titlebar {
    display: none;
  }

  .taskbar {
    display: none;
  }

  .mobile-bar-toggle {
    display: inline-flex;
  }

  #tt-body-page .mobile-bar-toggle[data-toggle="widgets"] {
    display: none;
  }

  .desktop-icons {
    display: none;
    position: fixed;
    top: 34px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--text);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06);

    z-index: 41;
    padding: 6px 0;
  }

  .desktop-icons.mobile-open {
    display: flex;
  }

  .desktop-icons .dicon {
    width: 100%;
    flex-direction: row;
    gap: 12px;
    padding: 10px 18px;
  }

  .desktop-icons .dicon-box {
    width: 26px;
    height: 26px;
    border: none;
    flex-shrink: 0;
  }

  .aside {
    display: none;
    position: fixed;
    top: 34px;
    right: 0;
    bottom: 0;
    width: min(280px, 84vw);
    background: #fff;
    border-left: 1px solid var(--text);
    box-shadow: -2px 2px 0 rgba(0, 0, 0, 0.06);
    z-index: 41;
    overflow-y: auto;
    padding: 20px 16px;
  }

  .aside.mobile-open {
    display: block;
  }

  .cat-bar {
    max-width: 50vw;
    overflow-x: auto;
  }

  .cat-bar li {
    flex-shrink: 0;
  }

  .tab-panel[data-panel="search"] {
    min-width: 0;
    width: min(240px, calc(100vw - 28px));
  }

  .search-input {
    width: 100%;
  }

  .mini-player {
    display: none !important;
  }

  .float-window.memo-window {
    position: fixed;
    top: 34px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    border: none;
    box-shadow: none;
    z-index: 41;
  }

  .memo-window .memo-body {
    flex: 1;
    overflow-y: auto;
  }

  .recent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-list.mix .post-thumb {
    width: 72px;
    height: 72px;
  }
}
/* ==== mobile layout matched to SavedSkin(2026-10-04) ==== */
@media (max-width: 720px) {
  html, body {
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }

  .os-shell {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 24px 8px 60px 96px;
  }

  #mainWindow,
  .window {
    position: fixed !important;
    left: 96px !important;
    right: 8px !important;
    top: 24px !important;
    bottom: auto !important;
    width: auto !important;
    min-width: 0;
    height: calc(100dvh - 210px) !important;
    max-height: calc(100dvh - 210px) !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box;
    border: 1px solid var(--text, #191818);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.06);
  }

  .window-body {
    min-width: 0;
  }

  .content-scroll {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 16px;
  }

  .titlebar {
    display: flex;
  }

  .taskbar {
    display: flex;
  }

  .desktop-icons {
    display: flex;
    position: fixed;
    top: 24px;
    left: 12px;
    right: auto;
    flex-direction: column;
    align-items: initial;
    gap: 20px;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    z-index: 1;
    padding: 0;
  }

  .desktop-icons .dicon {
    width: 64px;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
  }

  .desktop-icons .dicon-box {
    width: 40px;
    height: 40px;
    border: 1px solid var(--text);
  }

  .mobile-bar-toggle {
    display: none !important;
  }

  .mini-player {
    display: block !important;
  }

  .recent-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .post-list.mix .post-thumb {
    width: 76px;
    height: 76px;
  }

  #titlebarDrag {
    cursor: default !important;
    touch-action: pan-y;
  }
}

/* ==== mobile options: search + selectable widget column ==== */
@media (max-width: 720px) {
  /* 검색은 한 줄 가로 표시 */
  .tab-toggle[data-toggle="search"] {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px;
    width: auto !important;
    min-width: max-content !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    writing-mode: horizontal-tb !important;
  }

  /* 본문 전체 사용: 사이드 위젯 전체와 구분선을 없애고 본문이 창 전체를 사용 */
  body.mobile-widget-hide .aside {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
  }
  body.mobile-widget-hide .window-body {
    display: flex !important;
    width: 100% !important;
  }
  body.mobile-widget-hide .content-scroll {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* 원래대로 보이기: 방문자수/달력/원형표 등 오른쪽 위젯 + 구분선 복원 */
  body.mobile-widget-show .window-body {
    display: flex !important;
  }
  body.mobile-widget-show .aside {
    display: block !important;
    width: 170px !important;
    flex: 0 0 170px !important;
    padding: 22px 16px !important;
    border-left: 1px solid var(--divider) !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: auto !important;
  }
}

/* ==== widget layout option FIX: "본문 전체 사용"은 화면 크기와 관계없이 오른쪽 칸 자체를 제거 ==== */
body.mobile-widget-hide .window-body {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.mobile-widget-hide .aside {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  flex: 0 0 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  overflow: hidden !important;
}

body.mobile-widget-hide .content-scroll {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

/* 상세글/목록/보호글 등 본문 내부도 남은 칸 기준이 아니라 전체 content 폭 사용 */
body.mobile-widget-hide .content-scroll > *,
body.mobile-widget-hide .section,
body.mobile-widget-hide .post-detail,
body.mobile-widget-hide .post-list,
body.mobile-widget-hide .post-body {
  max-width: none !important;
  box-sizing: border-box !important;
}

/* ==== FIX: full-width content must stay inside the main window ==== */
body.mobile-widget-hide .window-body {
  display: flex !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body.mobile-widget-hide .content-scroll {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}
body.mobile-widget-hide .content-scroll img,
body.mobile-widget-hide .post-body img,
body.mobile-widget-hide .article img {
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box !important;
}


/* Archive list: title + date only */
.post-list.archive-list { display:flex !important; flex-direction:column !important; gap:0 !important; grid-template-columns:none !important; }
.post-list.archive-list .post-row { width:100% !important; display:flex !important; flex-direction:row !important; align-items:flex-start !important; gap:12px !important; padding:12px 0 !important; border:0 !important; border-bottom:1px solid var(--divider) !important; cursor:pointer !important; }
.post-list.archive-list .post-thumb,
.post-list.archive-list .post-video,
.post-list.archive-list .post-video-source,
.post-list.archive-list .post-icon-item,
.post-list.archive-list .post-excerpt { display:none !important; }
.post-list.archive-list .post-info { display:flex !important; flex:1 1 auto !important; min-width:0 !important; margin:0 !important; padding:0 !important; text-align:left !important; }
.post-list.archive-list .post-title-text { display:block !important; margin:0 !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; -webkit-line-clamp:unset !important; }
.post-list.archive-list .post-date { display:block !important; margin:0 !important; white-space:nowrap !important; }
body[data-list-date-position="below"] .post-list.archive-list .post-info { flex-direction:column !important; gap:3px !important; }
body[data-list-date-position="below"] .post-list.archive-list .post-date { margin-top:0 !important; }
body[data-list-date-position="right"] .post-list.archive-list .post-info { flex-direction:row !important; align-items:baseline !important; gap:12px !important; }
body[data-list-date-position="right"] .post-list.archive-list .post-title-text { flex:1 1 auto !important; }
body[data-list-date-position="right"] .post-list.archive-list .post-date { margin-left:auto !important; flex:0 0 auto !important; }

/* Comments are closed by default; opening reveals both list and writer */
.comments-toggle { appearance:none; -webkit-appearance:none; border:0; background:transparent; color:var(--text); font:inherit; width:100%; text-align:left; }
.comments-panel[hidden] { display:none !important; }
.comments-panel.open { display:block !important; max-height:none !important; opacity:1 !important; margin-top:28px; overflow:visible !important; }


/* FINAL: comment toggle is plain clickable text only */
.comments-section .comments-toggle {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: none !important;
  background-color: transparent !important;
  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
}
.comments-section .comments-toggle:hover,
.comments-section .comments-toggle:focus,
.comments-section .comments-toggle:active {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  outline: 0 !important;
}
.comments-section .comments-toggle .section-label,
.comments-section .comments-toggle-label {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* FINAL: normal post lists show title and date only */
.post-list.archive-list .post-excerpt,
.post-list.archive-list .post-summary,
.post-list.archive-list .summary,
.post-list.archive-list .desc,
.post-list.archive-list .post-video-source,
.post-list.archive-list .post-thumb,
.post-list.archive-list .post-video,
.post-list.archive-list .post-icon-item {
  display: none !important;
}

/* ABSOLUTE FINAL: comment toggle is a text link, never a box */
.comments-section a.comments-toggle,
.comments-section a.comments-toggle:link,
.comments-section a.comments-toggle:visited,
.comments-section a.comments-toggle:hover,
.comments-section a.comments-toggle:active,
.comments-section a.comments-toggle:focus {
  display: inline !important;
  width: auto !important; height: auto !important;
  margin: 0 !important; padding: 0 !important;
  border: none !important; border-radius: 0 !important;
  outline: none !important; box-shadow: none !important;
  background: transparent !important;
  color: inherit !important; font: inherit !important; line-height: inherit !important;
  text-decoration: none !important; cursor: pointer !important;
}

/* Home recent-list: follow the same title/date position option as archive lists */
.recent-list .post-row { width:100%; }
.recent-list .post-info { width:100%; min-width:0; }
body[data-list-date-position="below"] .recent-list .post-info {
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:3px !important;
}
body[data-list-date-position="below"] .recent-list .post-date {
  margin:0 !important;
  white-space:nowrap !important;
}
body[data-list-date-position="right"] .recent-list .post-info {
  display:flex !important;
  flex-direction:row !important;
  align-items:baseline !important;
  gap:12px !important;
}
body[data-list-date-position="right"] .recent-list .post-title-text {
  flex:1 1 auto !important;
  min-width:0 !important;
}
body[data-list-date-position="right"] .recent-list .post-date {
  margin-left:auto !important;
  flex:0 0 auto !important;
  white-space:nowrap !important;
  text-align:right !important;
}

/* category NEW mark: keep it beside the category label, never on a new line */
.cat-bar li > a {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  gap: 3px;
}
.cat-bar li > a img,
.cat-bar li > a .new,
.cat-bar li > a .new-mark,
.cat-bar li > a .ico_new,
.cat-bar li > a [class*="new"] {
  display: inline-block !important;
  position: static !important;
  float: none !important;
  margin: 0 0 0 2px !important;
  vertical-align: middle !important;
  flex: 0 0 auto !important;
}

/* 2026-10-04: mobile is always single-column inside the main window. */
@media (max-width: 720px) {
  .window-body {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .window-body > .aside,
  aside.aside {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    flex: 0 0 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
  }
  .content-scroll {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  .content-scroll > *, .content-scroll .section, .content-scroll .post-detail,
  .content-scroll .post-list, .content-scroll .post-body {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .content-scroll img, .post-body img, .article img { max-width:100% !important; height:auto !important; }
}

/* FIX: clock stays at the far bottom-right of the taskbar */
.taskbar-clock {
  margin-left: auto !important;
  margin-right: 0 !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  flex: 0 0 auto !important;
}

/* Hide only the visible scrollbar in comment / guestbook writing textareas */
.post-comments textarea,
.editorial-comments textarea,
.guestbook-body textarea,
.tt-box-textarea .tt-inner-g {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.post-comments textarea::-webkit-scrollbar,
.editorial-comments textarea::-webkit-scrollbar,
.guestbook-body textarea::-webkit-scrollbar,
.tt-box-textarea .tt-inner-g::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* 2026-10-04 final: slightly tighter top category spacing */
.cat-bar > ul {
  gap: 11px !important;
}

/* Keep Tistory's NEW mark on the same line, immediately beside the title. */
.post-list.archive-list .post-title-text,
.recent-list .post-title-text {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: auto !important;
  max-width: 100% !important;
  gap: 3px !important;
  vertical-align: middle !important;
}
.post-list.archive-list .post-title-text img,
.post-list.archive-list .post-title-text .new,
.post-list.archive-list .post-title-text .new-mark,
.post-list.archive-list .post-title-text .ico_new,
.post-list.archive-list .post-title-text [class*="new"],
.recent-list .post-title-text img,
.recent-list .post-title-text .new,
.recent-list .post-title-text .new-mark,
.recent-list .post-title-text .ico_new,
.recent-list .post-title-text [class*="new"] {
  display: inline-block !important;
  position: static !important;
  float: none !important;
  margin: 0 0 0 3px !important;
  vertical-align: middle !important;
  flex: 0 0 auto !important;
}

/* 2026-10-04: list NEW mark — preserve the same native shape/aspect ratio as category NEW */
.post-list.archive-list .post-title-text img,
.recent-list .post-title-text img {
  width: auto !important;
  height: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  flex: none !important;
  flex-shrink: 0 !important;
  object-fit: contain !important;
  aspect-ratio: auto !important;
}

/* selectable category presentation */
.side-category-panel {
  padding: 22px 26px;
  overflow: auto;
  flex: 1 1 auto;
}
.side-category-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side-category-list li {
  margin: 0 0 9px;
}
.side-category-list ul ul {
  padding-left: 18px;
  margin-top: 8px;
}
.side-category-list a {
  color: inherit;
  text-decoration: none;
}
body.category-mode-side .cat-bar > ul > li:not(:first-child) {
  display: none !important;
}

/* mobile memo: keep it as a window above the main window, like desktop */
@media (max-width: 720px) {
  .float-window.memo-window {
    position: fixed !important;
    top: 118px !important;
    left: 23% !important;
    right: auto !important;
    bottom: auto !important;
    width: 72% !important;
    max-width: none !important;
    height: min(62vh, 520px) !important;
    border: 1px solid var(--line, #191818) !important;
    box-shadow: none !important;
    z-index: 60 !important;
  }
  .memo-window .memo-body {
    overflow-y: auto !important;
  }
}

/* category panel repaired: lives inside the main content viewport */
.content-scroll > .side-category-panel[hidden] { display: none !important; }
.content-scroll > .side-category-panel:not([hidden]) {
  display: block !important;
  min-height: 100%;
  box-sizing: border-box;
}
body.side-category-open .content-scroll > .side-category-panel ~ * {
  display: none !important;
}
body.category-mode-side .cat-bar > ul > li:not(:first-child) {
  display: none !important;
}

/* 2026-10-04: mobile windows use content-driven height like desktop */
@media (max-width: 720px) {
  #mainWindow.window {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    bottom: auto !important;
  }

  #mainWindow .window-body,
  #mainWindow .content-scroll,
  #mainWindow .main-grid,
  #mainWindow .content-main {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  #mainWindow .content-scroll {
    overflow-y: visible !important;
  }

  .float-window.memo-window {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    bottom: auto !important;
  }

  .memo-window .memo-body {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
}

/* 2026-10-04 SAFE: SIDE category panel only */
.side-category-list li > a {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
}
.side-category-list li > a img {
  position: static !important;
  float: none !important;
  flex: 0 0 auto !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  margin-left: 3px !important;
  vertical-align: middle !important;
}
.side-category-list > ul > li:first-child > a.side-category-all-static img,
.side-category-list > ul > li:first-child > a.side-category-all-static .c_cnt {
  display: none !important;
}
.side-category-list > ul > li:first-child > a.side-category-all-static {
  cursor: default;
}

/* 2026-10-05 mobile scroll repair */
@media (max-width: 720px) {
  html, body {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .os-shell {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  #mainWindow.window {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    touch-action: pan-y !important;
  }

  #mainWindow .window-body,
  #mainWindow .content-scroll {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
    touch-action: pan-y !important;
  }
}

/* 2026-10-05 mobile horizontal position repair:
   keep launcher column visible, fit the whole main window in the remaining viewport */
@media (max-width: 720px) {
  .os-shell {
    box-sizing: border-box !important;
    width: 100% !important;
    padding-left: 96px !important;
    padding-right: 8px !important;
  }

  #mainWindow.window {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .desktop-icons {
    left: 12px !important;
    right: auto !important;
    z-index: 50 !important;
  }
}

/* 2026-10-05 guestbook/comment parent bubble: size to its text like reply bubbles */
.tt-list-reply > .tt-item-reply > .tt-wrap-cmt > .tt-box-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}
.tt-list-reply > .tt-item-reply > .tt-wrap-cmt > .tt-box-content > .tt-wrap-desc {
  display: inline-block !important;
  width: fit-content !important;
  max-width: min(100%, 720px) !important;
  align-self: flex-start !important;
  box-sizing: border-box !important;
  overflow-wrap: anywhere !important;
}

/* 2026-10-05: lower list/category titles by 2px only */
body[data-list-date-position="right"] .post-list.archive-list .post-title-text,
body[data-list-date-position="right"] .recent-list .post-title-text,
.cat-bar li > a {
  transform: translateY(2px) !important;
}

/* 2026-10-05: date 2px down; NEW marks 2px up from their current positions */
body[data-list-date-position="right"] .post-list.archive-list .post-date,
body[data-list-date-position="right"] .recent-list .post-date {
  transform: translateY(2px) !important;
}
.post-list.archive-list .post-title-text img,
.post-list.archive-list .post-title-text .new,
.post-list.archive-list .post-title-text .new-mark,
.post-list.archive-list .post-title-text .ico_new,
.post-list.archive-list .post-title-text [class*="new"],
.recent-list .post-title-text img,
.recent-list .post-title-text .new,
.recent-list .post-title-text .new-mark,
.recent-list .post-title-text .ico_new,
.recent-list .post-title-text [class*="new"],
.cat-bar li > a img,
.cat-bar li > a .new,
.cat-bar li > a .new-mark,
.cat-bar li > a .ico_new,
.cat-bar li > a [class*="new"] {
  transform: translateY(-2px) !important;
}

/* 2026-10-05: PC only — move category/list titles and right-side list dates 2px up; keep NEW marks visually unchanged */
@media (min-width: 1025px) {
  body[data-list-date-position="right"] .post-list.archive-list .post-title-text,
  body[data-list-date-position="right"] .recent-list .post-title-text,
  .cat-bar li > a,
  body[data-list-date-position="right"] .post-list.archive-list .post-date,
  body[data-list-date-position="right"] .recent-list .post-date {
    transform: translateY(0) !important;
  }

  .post-list.archive-list .post-title-text img,
  .post-list.archive-list .post-title-text .new,
  .post-list.archive-list .post-title-text .new-mark,
  .post-list.archive-list .post-title-text .ico_new,
  .post-list.archive-list .post-title-text [class*="new"],
  .recent-list .post-title-text img,
  .recent-list .post-title-text .new,
  .recent-list .post-title-text .new-mark,
  .recent-list .post-title-text .ico_new,
  .recent-list .post-title-text [class*="new"],
  .cat-bar li > a img,
  .cat-bar li > a .new,
  .cat-bar li > a .new-mark,
  .cat-bar li > a .ico_new,
  .cat-bar li > a [class*="new"] {
    transform: translateY(0) !important;
  }
}
