/* =========================================================
   Timeline Blog – FINAL
   - Warm off-white background
   - Sans only
   - Desktop font: 13px
   - Mobile font: 13px
   - Desktop: stable 2-column timeline
   - Mobile: compact timeline (date-col 55px)
   - Content spacing tightened (PC + Mobile)
   ========================================================= */

/* ================= Root ================= */

:root{
  --body-size: 13px;
  --content-max: 860px;
  --line-height: 1.68;

  --font: "Noto Sans KR", system-ui, -apple-system, "Segoe UI",
           Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --bg: #fbfaf6;
  --text: #000000;
  --muted: rgba(0,0,0,0.55);
  --border: rgba(0,0,0,0.14);
  --code-bg: rgba(0,0,0,0.03);

  --sel-bg: #000000;
  --sel-text: #ffffff;

  /* date scale (PC default) */
  --date-scale: 0.7;

  /* desktop layout */
  --date-col: 96px;
  --date-gap: 8px;
}

/* ================= Base ================= */

::selection{ background: var(--sel-bg); color: var(--sel-text); }
::-moz-selection{ background: var(--sel-bg); color: var(--sel-text); }

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--body-size);
  line-height: var(--line-height);
  letter-spacing: -0.01em;
}

#content{ width: 100%; }

/* ================= Wrapper ================= */

.wrap{
  width: min(var(--content-max), 92vw);
  margin: 0 auto;
  padding: 56px 20px 96px;
}

/* ================= Timeline ================= */

.item{
  padding: 6px 0;
}

.row{
  display: grid;
  grid-template-columns: var(--date-col) 1fr;
  gap: var(--date-gap);
  align-items: baseline;
}

.date{
  font-size: calc(var(--body-size) * var(--date-scale));
  line-height: var(--line-height);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  user-select: none;
  text-align: left;   /* always left aligned */
}

.title{
  all: unset;
  display: inline-block;
  font-size: var(--body-size);
  line-height: var(--line-height);
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}

.title:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ================= Content ================= */

.content{
  margin-left: calc(var(--date-col) + var(--date-gap));
  padding: 6px 0 6px;     /* ✅ tightened spacing */
}

.content-inner{
  font-size: var(--body-size);
  line-height: var(--line-height);
}

.content-inner p{
  margin: 0 0 0.6em;      /* ✅ tightened paragraph spacing */
}

.content-inner img,
.content-inner video,
.content-inner iframe{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;        /* ✅ tightened media spacing */
}

.content-inner a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-inner blockquote{
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 2px solid var(--border);
  color: var(--muted);
}

.content-inner pre{
  padding: 10px;
  border: 1px solid var(--border);
  overflow: auto;
  background: var(--code-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
               Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

/* ================= Paging ================= */

.paging{
  margin-top: 56px;
  display: flex;
  justify-content: center;
  user-select: none;
}

.paging-inner{
  display: flex;
  align-items: center;
  gap: 22px;
}

.paging-btn{
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: 2px 0;
}

.paging-btn:hover{
  color: var(--text);
  border-bottom-color: var(--border);
}

.paging-mid{
  color: var(--muted);
  opacity: 0.9;
}

/* ================= Mobile ================= */

@media (max-width: 640px){
  :root{
    --body-size: 13px;
    --date-scale: 0.65;

    /* ✅ mobile optimized */
    --date-col: 55px;   /* final confirmed */
    --date-gap: 8px;
  }

  .wrap{
    padding: 36px 10px 56px;  /* tighter mobile padding */
  }

  .row{
    grid-template-columns: var(--date-col) 1fr;
    gap: var(--date-gap);
  }

  .date{
    text-align: left;
  }

  /* content full width on mobile */
  .content{
    margin-left: 0;
    padding: 6px 0 6px;
  }

  .paging-inner{
    gap: 16px;
  }
}

/* ================= PC layout safety ================= */

@media (min-width: 641px){
  .wrap{
    width: min(860px, 92vw);
    margin: 0 auto;
    padding: 56px 20px 96px;
  }

  .row{
    grid-template-columns: 96px 1fr;
    gap: 8px;
  }

  .content{
    margin-left: calc(96px + 8px);
  }

  .date{
    text-align: left;
  }
}

/* ================= Hide Tistory UI ================= */

div[class*="postbtn"],
div[class*="reaction"],
div[class*="subscription"],
.area_postbtn,
.wrap_btn,
.postbtn_like,
.btn_like,
.share_btn,
.btn_subscription,
.subscribe_layer,
.subscribe_wrap{
  display: none !important;
}
/* ===== EDITORIA: text color patch (#1f1e1c) ===== */

/* 1) 전체 기본 텍스트 컬러 */
html, body {
  color: #302f2d !important;
}

/* 2) 본문 영역까지 강제 적용 (티스토리 기본 #000 덮기) */
.article, .article * ,
.entry-content, .entry-content * ,
.tt_article_useless_p_margin, .tt_article_useless_p_margin * ,
#content, #content * {
  color: #302f2d !important;
}

/* 3) 날짜 / 메타 정보는 살짝 연하게 */
.date, 
.article_info, 
.tt_date, 
.entry-date, 
.article-date {
  color: rgba(31,30,28,.62) !important;
}

/* 4) 링크 컬러 통일 */
a, a:visited {
  color: #302f2d !important;
}
a:hover {
  opacity: .65;
}

/* 5) 선택 텍스트(드래그) 대비 완화 */
::selection {
  background: rgba(31,30,28,.14);
  color: #302f2d;
}