
:root{
  --bg:#f5f3ef;
  --bg-2:#fcfaf7;
  --surface:#fffdfa;
  --surface-2:#fff8f2;
  --text:#252a34;
  --muted:#697382;
  --line:#e6ddd3;
  --line-2:#e8dccf;
  --primary:#252a34;
  --accent:#e88a5b;
  --accent-2:#5c6b8a;
  --accent-soft:#fff1e6;
  --navy-soft:#eef2f9;
  --charcoal:#2b3038;
  --shadow:0 16px 40px rgba(54,61,79,.06);
  --radius:22px;
  --shell:1140px;
  --article:780px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:linear-gradient(180deg,var(--bg) 0%,var(--bg-2) 220px,var(--bg) 100%);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR","Apple SD Gothic Neo",sans-serif;
  font-size:16px;
  line-height:1.72;
  -webkit-font-smoothing:antialiased
}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button,input{font:inherit}
button{cursor:pointer}
summary{list-style:none;cursor:pointer}
summary::-webkit-details-marker{display:none}

.skip-link{
  position:fixed;left:12px;top:-48px;z-index:1000;
  background:#fff;padding:10px 14px;border-radius:10px
}
.skip-link:focus{top:12px}
.shell,.header-inner{
  width:min(calc(100% - 40px),var(--shell));
  margin:0 auto
}

/* HEADER */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(252,250,247,.94);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(92,107,138,.08)
}
.topbar{
  min-height:78px;
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:18px;
  align-items:center
}
.brand{
  display:flex;align-items:center;gap:12px;min-width:0
}
.brand-avatar{
  width:50px;height:50px;
  border-radius:16px;
  object-fit:cover;flex:0 0 auto;
  border:2px solid rgba(255,255,255,.92);
  box-shadow:0 7px 18px rgba(54,61,79,.08)
}
.brand-copy{display:flex;flex-direction:column;min-width:0}
.brand-copy strong{
  font-size:19px;font-weight:900;
  letter-spacing:-.03em;color:var(--primary)
}
.brand-copy small{
  margin-top:3px;font-size:11px;
  font-weight:700;color:#8d94a0
}
.desktop-menu ul{
  list-style:none;padding:0;margin:0;
  display:flex;align-items:center;gap:4px
}
.desktop-menu a{
  display:block;padding:9px 11px;
  border-radius:11px;
  color:#566171;font-size:14px;font-weight:800
}
.desktop-menu a:hover{
  background:var(--navy-soft);color:var(--primary)
}

/* HEADER TOOLS */
.header-tools{
  position:relative;
  display:flex;
  gap:7px;
  align-items:center
}
.tool-popover{position:relative}
.icon-button{
  width:40px;height:40px;
  border:0;border-radius:11px;
  display:grid;place-items:center;
  background:var(--navy-soft);color:#5b6985
}
.icon-button:hover,
.tool-popover[open]>.icon-button{
  background:#e6edf9;
  color:#2d384f
}
.icon-button svg,
.search-box svg{
  width:20px;height:20px;
  fill:none;stroke:currentColor;
  stroke-width:2;stroke-linecap:round
}
.tool-panel{
  position:absolute;
  top:calc(100% + 12px);
  right:0;
  z-index:70;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 20px 50px rgba(54,61,79,.12)
}
.search-tool-panel{
  width:min(480px,calc(100vw - 32px));
  padding:12px
}
.search-box{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;align-items:center;
  padding:7px 7px 7px 13px;
  border:1px solid var(--line);
  border-radius:13px;background:#fff
}
.search-box input{
  border:0;outline:0;min-width:0;background:transparent
}
.search-box input::placeholder{color:#9aa2ad}
.search-box button{
  border:0;border-radius:9px;
  padding:8px 13px;
  background:var(--accent-2);
  color:#fff;font-weight:800
}

.category-tool-panel{
  width:min(380px,calc(100vw - 32px));
  max-height:min(640px,calc(100vh - 110px));
  overflow:auto;
  padding:18px
}
.panel-head{
  display:flex;align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  padding-bottom:13px;
  border-bottom:1px solid var(--line)
}
.panel-head>div{display:flex;flex-direction:column}
.panel-eyebrow{
  color:var(--accent);
  font-size:10px;font-weight:900;
  letter-spacing:.15em
}
.panel-head strong{
  margin-top:2px;
  font-size:21px;letter-spacing:-.03em
}
.all-posts-link{
  color:var(--accent-2);
  font-size:12px;font-weight:900
}
.category-list{margin-top:10px}
.category-list ul{list-style:none;padding:0;margin:0}
.category-list>ul>li>a{font-weight:900;color:#2e3642}
.category-list a{
  display:block;padding:9px 8px;
  border-radius:9px;
  color:#606b79;font-size:14px
}
.category-list a:hover{background:var(--navy-soft);color:var(--accent-2)}
.category-list ul ul{
  margin:2px 0 4px 10px;
  padding-left:10px;
  border-left:1px solid #dde4ee
}
.category-list ul ul a{font-size:13px;color:#768091}
.panel-quick-links{
  display:flex;gap:8px;
  margin-top:13px;padding-top:13px;
  border-top:1px solid var(--line)
}
.panel-quick-links a{
  flex:1;text-align:center;
  padding:9px 8px;
  border-radius:10px;
  background:var(--accent-soft);
  color:#7c6558;
  font-size:12px;font-weight:900
}

/* MAIN */
.site-main{padding:28px 0 72px}
.eyebrow{
  margin:0 0 7px;
  color:var(--accent);
  font-size:11px;font-weight:900;
  letter-spacing:.14em;line-height:1.2
}

/* HOME */
.home-only{display:none}
#tt-body-index .home-only{display:block}
#tt-body-index .home-only.hero{display:grid}
.hero{
  margin-bottom:26px;
  padding:24px 28px;
  min-height:305px;
  grid-template-columns:1.45fr .7fr;
  gap:26px;align-items:center;
  border:1px solid var(--line-2);
  border-radius:28px;
  background:
    radial-gradient(circle at 86% 10%,rgba(232,138,91,.13),transparent 26%),
    linear-gradient(135deg,#fffaf6 0%,#f8f8fb 100%);
  box-shadow:var(--shadow)
}
.hero-copy h1{
  margin:0;
  font-size:clamp(34px,4.5vw,50px);
  line-height:1.1;
  letter-spacing:-.05em
}
.hero-copy p{
  max-width:640px;
  margin:14px 0 0;
  color:#5c6674;
  font-size:16px;
  line-height:1.78
}
.hero-badges{
  max-width:720px;
  display:flex;flex-wrap:wrap;
  gap:8px;margin-top:18px
}
.hero-badges span{
  padding:7px 11px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  color:#5a6779;
  font-size:12px;font-weight:800
}
.hero-badges span:nth-child(3n+1){background:#fffdfb}
.hero-badges span:nth-child(3n+2){background:#f5f7fc}
.hero-badges span:nth-child(3n){background:#fff5ee}
.hero-art{display:flex;justify-content:flex-end}
.hero-art-card{
  width:250px;padding:10px;
  border-radius:24px;
  background:#fff;border:1px solid var(--line);
  box-shadow:0 10px 26px rgba(54,61,79,.08)
}
.hero-art-card img{
  width:100%;aspect-ratio:1/1;
  object-fit:cover;border-radius:17px
}
.section-head{
  margin:0 auto 16px;
  width:min(calc(100% - 40px),var(--shell))
}
.section-head.single{width:100%;margin:0 0 14px}
.section-head h2{
  margin:0;font-size:36px;
  line-height:1.2;letter-spacing:-.04em
}

/* LIST CONTEXTS */
#tt-body-index .list-view{display:none}
#tt-body-index .article-loop{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px
}
#tt-body-page .home-only,
#tt-body-category .home-only,
#tt-body-search .home-only,
#tt-body-archive .home-only,
#tt-body-tag .home-only,
#tt-body-notice .home-only,
#tt-body-guestbook .home-only{display:none !important}
#tt-body-page .list-view{display:none}

.page-head{margin-bottom:28px}
.page-head h1{
  margin:0;
  font-size:clamp(28px,4vw,42px);
  line-height:1.2;letter-spacing:-.04em
}
.page-desc{max-width:720px;margin:10px 0 8px;color:var(--muted)}
.page-count{font-size:13px;color:#949daa}

.card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px
}
.article-loop{
  width:min(calc(100% - 40px),var(--shell));
  margin:0 auto
}
#tt-body-page .article-loop{width:min(calc(100% - 40px),var(--article))}
#tt-body-page .article-loop .article-shell{width:100%}

.card{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--shadow)
}
.card-thumb{
  position:relative;display:block;overflow:hidden;
  aspect-ratio:16/9;
  background:linear-gradient(135deg,#f7eee6,#f0dfce 55%,#e7d5ca)
}
.card-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .28s ease}
.card:hover .card-thumb img{transform:scale(1.025)}
.fallback-label{
  position:absolute;inset:0;
  display:grid;place-items:center;
  color:rgba(55,39,29,.18);
  font-size:13px;font-weight:900;
  letter-spacing:.16em
}
.card-body{padding:17px 18px 19px}
.card-meta{
  display:flex;gap:9px;align-items:center;
  flex-wrap:wrap;color:#95a0af;font-size:12px
}
.card-meta a{color:var(--accent);font-weight:900}
.card-meta span::before{
  content:"";display:inline-block;
  width:4px;height:4px;border-radius:50%;
  background:#d5dce5;margin:0 8px 2px 0
}
.card h2{margin:9px 0 8px;font-size:19px;line-height:1.42;letter-spacing:-.03em}
.card h2 a:hover{color:var(--accent-2)}
.card p{
  margin:0;color:#687383;font-size:14px;line-height:1.66;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow:hidden;min-height:3.3em
}
.read-more{
  display:inline-flex;margin-top:13px;padding:8px 11px;
  border-radius:11px;background:var(--accent-soft);color:#ad643d;
  font-size:13px;font-weight:900
}
.read-more:hover{background:#ffe8d8}

/* SEARCH/CATEGORY lower preview list: horizontal instead of oversized full cards */
#tt-body-search .article-loop,
#tt-body-category .article-loop,
#tt-body-archive .article-loop,
#tt-body-tag .article-loop{
  margin-top:28px;
  display:flex;
  flex-direction:column;
  gap:16px
}
#tt-body-search .article-loop .card,
#tt-body-category .article-loop .card,
#tt-body-archive .article-loop .card,
#tt-body-tag .article-loop .card{
  display:grid;
  grid-template-columns:280px 1fr;
  align-items:stretch;
  border-radius:20px
}
#tt-body-search .article-loop .card-thumb,
#tt-body-category .article-loop .card-thumb,
#tt-body-archive .article-loop .card-thumb,
#tt-body-tag .article-loop .card-thumb{
  aspect-ratio:auto;
  min-height:180px;
  height:100%;
  border-radius:20px 0 0 20px
}
#tt-body-search .article-loop .card-body,
#tt-body-category .article-loop .card-body,
#tt-body-archive .article-loop .card-body,
#tt-body-tag .article-loop .card-body{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:22px 24px
}
#tt-body-search .article-loop .card h2,
#tt-body-category .article-loop .card h2,
#tt-body-archive .article-loop .card h2,
#tt-body-tag .article-loop .card h2{
  font-size:24px;
  line-height:1.36;
  margin-top:10px
}
#tt-body-search .article-loop .card p,
#tt-body-category .article-loop .card p,
#tt-body-archive .article-loop .card p,
#tt-body-tag .article-loop .card p{
  -webkit-line-clamp:3;
  min-height:auto;
  font-size:15px
}
#tt-body-search .article-loop .card .read-more,
#tt-body-category .article-loop .card .read-more,
#tt-body-archive .article-loop .card .read-more,
#tt-body-tag .article-loop .card .read-more{align-self:flex-start}

/* ARTICLE */
.article-shell{width:min(calc(100% - 40px),var(--article));margin:0 auto}
.article-header{padding:16px 0 26px;border-bottom:1px solid var(--line)}
.article-category{display:inline-flex;margin-bottom:12px;color:var(--accent);font-size:13px;font-weight:900}
.article-header h1{margin:0;font-size:clamp(32px,5vw,48px);line-height:1.22;letter-spacing:-.045em;word-break:keep-all}
.article-meta{margin-top:15px;display:flex;flex-wrap:wrap;gap:8px 14px;color:#8f99a6;font-size:13px}
.article-meta button{padding:0;border:0;background:none;color:inherit}
.article-body{padding:34px 0 10px;font-size:17px;line-height:1.84;word-break:keep-all}
.article-body>*:first-child{margin-top:0}
.article-body h2{margin:54px 0 16px;font-size:28px;line-height:1.35;letter-spacing:-.035em}
.article-body h3{margin:34px 0 12px;font-size:21px;line-height:1.4;letter-spacing:-.02em}
.article-body p{margin:0 0 20px}
.article-body a{color:var(--accent-2);text-decoration:underline;text-underline-offset:3px}
.article-body img{height:auto !important;border-radius:14px}
.article-body figure{margin:30px 0}
.article-body figcaption{margin-top:8px;color:var(--muted);font-size:13px;text-align:center}
.article-body blockquote{margin:28px 0;padding:18px 20px;border-left:4px solid var(--accent);background:#fff7f1;border-radius:0 12px 12px 0;color:#576171}
.article-body pre{overflow-x:auto;padding:18px;border-radius:14px;background:#2f3440;color:#fff6ef;font-size:14px;line-height:1.7}
.article-body code{padding:.15em .35em;border-radius:6px;background:#f3f5f8;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9em}
.article-body pre code{padding:0;background:none}
.article-body table{width:100%;margin:28px 0;border-collapse:collapse;border-spacing:0;font-size:14px}
.article-body th,.article-body td{padding:12px 13px;border:1px solid var(--line);text-align:left;vertical-align:top}
.article-body th{background:#f6f7fb}
.article-body hr{margin:42px 0;border:0;border-top:1px solid var(--line)}
.tag-area{margin-top:38px;padding:20px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.tag-area strong{display:block;margin-bottom:9px;color:#98a0aa;font-size:10px;letter-spacing:.15em}
.tag-area a{display:inline-flex;margin:4px 4px 4px 0;padding:6px 10px;border-radius:999px;background:#eef2f9;color:#627189;font-size:12px}
.related{margin-top:44px}
.related-grid{margin-top:15px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.related-card{padding:13px;border:1px solid var(--line);border-radius:16px;background:#fffefb}
.related-card img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:11px;margin-bottom:9px}
.related-card strong{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:14px;line-height:1.46}
.related-card span{color:#9ba3ad;font-size:11px}
.comment-wrap{margin-top:44px}

/* UTIL */
.protected-box{padding:52px 0}
.protected-box h1{margin:0 0 10px;font-size:34px;letter-spacing:-.04em}
.protected-box p{color:var(--muted)}
.protected-form{display:flex;gap:8px;max-width:440px}
.protected-form input{flex:1;min-width:0;border:1px solid var(--line);border-radius:12px;padding:11px 12px;background:#fff}
.protected-form button{border:0;border-radius:12px;padding:0 17px;background:var(--accent-2);color:#fff;font-weight:900}
.tag-cloud{margin-top:22px;display:flex;flex-wrap:wrap;gap:8px}
.tag-cloud a{padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#647285;font-size:13px}
.paging{margin-top:42px;display:flex;justify-content:center;align-items:center;gap:14px;flex-wrap:wrap}
.page-numbers{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.paging a{
  min-width:44px;min-height:44px;
  display:inline-grid;place-items:center;
  padding:0 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.74);
  color:#667180;font-size:14px;font-weight:700;
  backdrop-filter:blur(3px)
}
.paging a:hover{border-color:#d4dce9;color:var(--accent-2);background:#fff}
.paging .selected{
  background:linear-gradient(180deg,#fff7f1 0%, #fff0e5 100%);
  color:#b5653d;
  border-color:#efc5ab;
  box-shadow:0 8px 18px rgba(232,138,91,.14);
}
.paging .no-more-prev,.paging .no-more-next{opacity:.42;pointer-events:none}
.page-nav{padding:0 14px}
.empty-state{grid-column:1/-1;padding:60px 0;text-align:center;color:var(--muted)}
.empty-state strong{display:block;color:var(--primary);font-size:18px;margin-bottom:6px}

/* FOOTER */
.site-footer{padding:32px 0 40px;border-top:1px solid rgba(92,107,138,.08);background:#fbfaf7}
.footer-inner{display:grid;grid-template-columns:1fr auto;gap:16px 24px;align-items:center}
.footer-profile{display:flex;align-items:center;gap:13px}
.footer-profile img{width:50px;height:50px;border-radius:16px;object-fit:cover;border:1px solid var(--line)}
.footer-profile strong{font-size:16px}
.footer-profile p{margin:4px 0 0;color:var(--muted);font-size:13px}
.footer-links{display:flex;gap:12px;font-size:13px;font-weight:800;color:#738091}
.footer-links a:hover{color:var(--accent-2)}

/* RESPONSIVE */
@media (max-width:980px){
  .desktop-menu{display:none}
  .topbar{grid-template-columns:1fr auto}
  .hero{grid-template-columns:1fr .72fr;min-height:280px}
  .card-grid,#tt-body-index .article-loop{grid-template-columns:repeat(2,minmax(0,1fr))}
  #tt-body-search .article-loop .card,
  #tt-body-category .article-loop .card,
  #tt-body-archive .article-loop .card,
  #tt-body-tag .article-loop .card{grid-template-columns:220px 1fr}
}
@media (max-width:700px){
  .shell,.header-inner,.article-shell,.article-loop,#tt-body-page .article-loop{width:min(calc(100% - 28px),var(--shell))}
  .brand-avatar{width:46px;height:46px;border-radius:14px}
  .brand-copy strong{font-size:17px}
  .site-main{padding-top:20px}
  .hero{grid-template-columns:1fr;min-height:auto;padding:22px;border-radius:23px}
  .hero-copy h1{font-size:34px}
  .hero-copy p{font-size:15px}
  .hero-art{justify-content:flex-start}
  .hero-art-card{width:210px}
  .hero-badges{gap:7px}
  .hero-badges span{padding:6px 9px;font-size:11px}
  .card-grid,#tt-body-index .article-loop{grid-template-columns:1fr;gap:16px}
  #tt-body-search .article-loop .card,
  #tt-body-category .article-loop .card,
  #tt-body-archive .article-loop .card,
  #tt-body-tag .article-loop .card{grid-template-columns:1fr}
  #tt-body-search .article-loop .card-thumb,
  #tt-body-category .article-loop .card-thumb,
  #tt-body-archive .article-loop .card-thumb,
  #tt-body-tag .article-loop .card-thumb{aspect-ratio:16/9;min-height:auto;border-radius:20px 20px 0 0}
  .article-header h1{font-size:31px}
  .article-body{font-size:16px;padding-top:28px}
  .article-body h2{font-size:24px;margin-top:44px}
  .article-body h3{font-size:20px}
  .related-grid{grid-template-columns:1fr}
  .footer-inner{grid-template-columns:1fr}
  .page-numbers a:nth-child(n+6){display:none}
  .category-tool-panel{position:fixed;top:74px;right:14px;left:14px;width:auto}
  .search-tool-panel{position:fixed;top:74px;right:14px;left:14px;width:auto}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{transition:none !important;scroll-behavior:auto !important}}


/* FINAL STABLE — guestbook */
.guestbook-shell{
  width:min(calc(100% - 40px),var(--article));
  margin:0 auto
}
.guest-form{
  padding:20px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface);
  box-shadow:var(--shadow)
}
.guest-fields{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:10px
}
.guest-form input,
.guest-form textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  color:var(--text);
  padding:11px 12px;
  outline:none
}
.guest-form textarea{
  min-height:130px;
  resize:vertical
}
.guest-form input:focus,
.guest-form textarea:focus{
  border-color:#cfd7e5;
  box-shadow:0 0 0 3px rgba(92,107,138,.08)
}
.guest-form button{
  margin-top:10px;
  border:0;
  border-radius:11px;
  padding:10px 15px;
  background:var(--accent-2);
  color:#fff;
  font-weight:900
}
.guest-list,
.guest-replies{
  list-style:none;
  padding:0;
  margin:24px 0 0
}
.guest-item{
  padding:18px 0;
  border-bottom:1px solid var(--line)
}
.guest-replies{
  margin:14px 0 0 24px;
  padding-left:18px;
  border-left:2px solid #e6ebf3
}
.guest-item.reply{
  padding:14px 0
}
.guest-entry-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px
}
.guest-entry-top strong{font-size:14px}
.guest-entry-top span{color:#98a0aa;font-size:12px}
.guest-entry p{
  margin:8px 0 0;
  color:#5f6a79
}
.guest-actions{
  display:flex;
  gap:10px;
  margin-top:8px
}
.guest-actions a{
  color:#8a94a4;
  font-size:12px;
  font-weight:800
}

/* Prevent accidental home/list blocks from flashing before safety cleanup */
#tt-body-page .home-only,
#tt-body-page .list-view,
#tt-body-notice .home-only,
#tt-body-guestbook .home-only,
#tt-body-guestbook .list-view{
  display:none !important
}

@media (max-width:700px){
  .guestbook-shell{width:min(calc(100% - 28px),var(--article))}
  .guest-fields{grid-template-columns:1fr}
}
