/*
Theme Name: Commentiger
Theme URI: https://commentiger.com/
Description: A fast, light-mode review blog child theme for 코멘타이거.
Author: Hermes Agent
Template: twentytwentyfour
Version: 1.1.0
Text Domain: commentiger
*/

:root {
  --ct-bg: #ffffff;
  --ct-surface: #fffaf5;
  --ct-surface-2: #f9fafb;
  --ct-text: #111827;
  --ct-muted: #5b6472;
  --ct-faint: #8a94a6;
  --ct-border: #e6e8ee;
  --ct-orange: #f97316;
  --ct-orange-dark: #c2410c;
  --ct-orange-soft: #fff7ed;
  --ct-green: #15803d;
  --ct-radius: 16px;
  --ct-shadow: 0 10px 28px rgba(17, 24, 39, .06), 0 1px 5px rgba(17, 24, 39, .04);
  --ct-max: 1120px;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
  overflow-x: hidden;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  width: 100%;
  max-width: 100vw;
  margin: 0;
  background: var(--ct-bg) !important;
  color: var(--ct-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
img, video, iframe, table { max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(249,115,22,.42); outline-offset: 3px; border-radius: 10px; }
.wp-site-blocks { width: 100%; max-width: 100vw; padding: 0; overflow-x: clip; }
.wp-block-post-title a, .wp-block-query-title, h1, h2, h3 { letter-spacing: -.025em; }

/* Header */
header .wp-block-group.alignwide:first-child {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: none !important;
  padding: 12px max(18px, calc((100vw - var(--ct-max)) / 2)) !important;
  border-bottom: 1px solid rgba(230,232,238,.95);
  background: rgba(255,255,255,.95) !important;
  box-shadow: 0 1px 0 rgba(17,24,39,.02);
}
.admin-bar header .wp-block-group.alignwide:first-child { top: 32px; }
.wp-block-site-title { font-weight: 850; letter-spacing: -.04em; font-size: clamp(1.2rem, 2vw, 1.45rem); }
.wp-block-site-title a { text-decoration: none; }
.wp-block-site-title a::before { content: "🐯"; margin-right: .38rem; font-size: .95em; }
.wp-block-navigation { font-size: .92rem; font-weight: 650; color: #293241; }
.wp-block-navigation a { padding: 8px 9px; border-radius: 999px; }
.wp-block-navigation a:hover { background: var(--ct-orange-soft); color: var(--ct-orange-dark); text-decoration: none; }
.wp-block-navigation__submenu-container { border: 1px solid var(--ct-border) !important; border-radius: 14px; box-shadow: var(--ct-shadow); padding: 8px !important; }

/* Shared */
.ct-section { max-width: var(--ct-max); margin: 0 auto; padding: clamp(28px, 5vw, 56px) 22px; }
.ct-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--ct-orange-dark); font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.ct-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ct-orange); box-shadow: 0 0 0 5px var(--ct-orange-soft); }
.ct-title { margin: 0; max-width: 780px; color: var(--ct-text); font-size: clamp(2rem, 5.4vw, 4rem); line-height: 1.02; letter-spacing: -.065em; }
.ct-lead { max-width: 740px; margin: 14px 0 0; color: var(--ct-muted); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.68; }
.ct-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--ct-text); background: var(--ct-text); color: #fff; text-decoration: none; font-weight: 800; }
.ct-button.secondary { background: #fff; color: var(--ct-text); border-color: var(--ct-border); }
.ct-chip { display: inline-flex; margin-bottom: 12px; padding: 5px 10px; border-radius: 999px; background: var(--ct-orange-soft); color: var(--ct-orange-dark); font-size: .76rem; font-weight: 800; }

/* Blog-first home */
.ct-compact-hero {
  padding-top: clamp(30px, 6vw, 58px);
  padding-bottom: clamp(18px, 3vw, 30px);
  border-bottom: 1px solid rgba(230,232,238,.75);
  background: linear-gradient(180deg, rgba(255,247,237,.62), rgba(255,255,255,0));
}
.ct-topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  overflow: visible;
  margin-top: 18px;
  padding-bottom: 2px;
}
.ct-topic-strip a {
  flex: 0 1 auto;
  min-width: 0;
  padding: 8px 13px;
  border: 1px solid var(--ct-border);
  border-radius: 999px;
  background: #fff;
  color: #293241;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 760;
  white-space: nowrap;
}
.ct-topic-strip a:hover { border-color: rgba(249,115,22,.44); background: var(--ct-orange-soft); color: var(--ct-orange-dark); }
.ct-first-feed { padding-top: clamp(24px, 4vw, 40px); }
.ct-first-feed > h2, .ct-latest > h2 { margin: 0; font-size: clamp(1.65rem, 3.6vw, 2.55rem); line-height: 1.1; }
.ct-first-feed > p, .ct-latest > p { margin: 8px 0 0; color: var(--ct-muted); line-height: 1.62; }

/* Post feed: compact list on mobile, magazine cards on desktop */
.ct-latest .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
  padding-left: 0;
}
.ct-latest .wp-block-post {
  list-style: none;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: #fff;
  padding: 18px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ct-latest .wp-block-post:hover { transform: translateY(-2px); border-color: rgba(249,115,22,.38); box-shadow: var(--ct-shadow); }
.ct-latest .wp-block-post-title { margin: 0 0 8px; font-size: 1.18rem; line-height: 1.35; }
.ct-latest .wp-block-post-title a { text-decoration: none; }
.ct-latest .wp-block-post-title a:hover { color: var(--ct-orange-dark); }
.ct-latest .wp-block-post-excerpt { margin: 0; }
.ct-latest .wp-block-post-excerpt__excerpt { margin: 0 0 9px; color: var(--ct-muted); line-height: 1.58; font-size: .96rem; }
.ct-latest .wp-block-post-excerpt__more-link { font-weight: 800; color: var(--ct-orange-dark); }
.ct-latest .wp-block-post-date { color: var(--ct-faint); font-size: .84rem; }
.ct-empty-state.compact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  border: 1px dashed rgba(249,115,22,.32);
  border-radius: 16px;
  background: #fffaf5;
  padding: 15px 16px;
  color: var(--ct-muted);
  line-height: 1.55;
}
.ct-empty-state.compact strong { color: var(--ct-text); }
.ct-empty-state.compact a { color: var(--ct-orange-dark); font-weight: 800; }

/* Category index */
.ct-category-index { border-top: 1px solid rgba(230,232,238,.72); }
.ct-section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.ct-section-head h2 { margin: 0; font-size: clamp(1.55rem, 3.4vw, 2.35rem); line-height: 1.1; }
.ct-section-head p { max-width: 520px; margin: 0; color: var(--ct-muted); line-height: 1.62; }
.ct-category-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ct-category-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--ct-border);
  border-radius: 14px;
  background: #fff;
  padding: 14px 15px;
  text-decoration: none;
}
.ct-category-list a:hover { border-color: rgba(249,115,22,.42); background: var(--ct-orange-soft); }
.ct-category-list b { font-size: .98rem; }
.ct-category-list span { color: var(--ct-muted); font-size: .86rem; text-align: right; }

/* Brief about */
.ct-about-brief { padding-top: 20px; }
.ct-about-brief h2 { margin: 0 0 14px; font-size: clamp(1.45rem, 3vw, 2.1rem); }
.ct-brief-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.ct-brief-grid p { margin: 0; border: 1px solid var(--ct-border); border-radius: 14px; background: var(--ct-surface-2); padding: 15px; color: var(--ct-muted); line-height: 1.62; }
.ct-brief-grid b { color: var(--ct-text); }
.ct-small-link { margin: 14px 0 0; }
.ct-small-link a { color: var(--ct-orange-dark); font-weight: 850; }

/* Legacy components retained for pages that may still use them */
.ct-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ct-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.ct-card { display: block; min-height: 142px; padding: 18px; border: 1px solid var(--ct-border); border-radius: var(--ct-radius); background: #fff; text-decoration: none; }
.ct-card p { margin: 0; color: var(--ct-muted); line-height: 1.58; }

/* Content pages */
main .wp-block-post-content, .entry-content { line-height: 1.78; }
.single .wp-block-post-title { max-width: 820px; font-size: clamp(2.1rem, 5vw, 3.7rem); line-height: 1.08; letter-spacing: -.055em; }
.single main, .page main, .archive main { max-width: var(--ct-max); margin-inline: auto; padding-inline: 22px; }

/* Footer */
footer { border-top: 1px solid var(--ct-border); background: #0f172a !important; color: #e5e7eb !important; }
footer a, footer .wp-block-navigation-item__content { color: #f8fafc !important; opacity: 1 !important; text-decoration: none; }
footer a:hover { color: #fed7aa !important; }
footer .wp-block-navigation { gap: 12px; }

@media (max-width: 900px) {
  .ct-latest .wp-block-post-template, .ct-category-list { grid-template-columns: 1fr; }
  .ct-brief-grid { grid-template-columns: 1fr; }
  .ct-section-head { display: block; }
  .ct-section-head p { margin-top: 8px; }
}
@media (max-width: 640px) {
  header .wp-block-group.alignwide:first-child { position: static; padding: 10px 16px !important; }
  .wp-block-navigation { font-size: .88rem; }
  .ct-section { width: 100%; padding-inline: 16px; }
  .ct-compact-hero { padding-top: 22px; padding-bottom: 16px; }
  .ct-title { max-width: 100%; font-size: clamp(1.65rem, 8.6vw, 2.28rem); line-height: 1.08; letter-spacing: -.05em; }
  .ct-lead { max-width: 100%; margin-top: 10px; font-size: .96rem; line-height: 1.56; }
  .ct-topic-strip { margin-top: 14px; gap: 6px; }
  .ct-topic-strip a { padding: 7px 10px; font-size: .86rem; }
  .ct-first-feed { padding-top: 22px; }
  .ct-latest .wp-block-post-template { gap: 10px; margin-top: 14px; }
  .ct-latest .wp-block-post { padding: 14px; border-radius: 14px; }
  .ct-latest .wp-block-post-title { font-size: 1.04rem; margin-bottom: 6px; }
  .ct-latest .wp-block-post-excerpt__excerpt { font-size: .92rem; line-height: 1.5; }
  .ct-category-list a { padding: 12px 13px; }
  .ct-category-list span { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
