/* 함께하기(전문가 그룹 · 오프라인 모임 · 지역모임 소식) · 성장 · 학교 · 마이페이지 · 회원가입 · 약관 화면.
 * style.css 의 색(--blue 등) · .panel · .card · .btn 을 그대로 쓰고, 여기에는 tg- 로 시작하는 것만 둔다. */

/* 하위 메뉴 탭 */
.tg-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.tg-tabs a{display:inline-block;padding:8px 16px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink-soft);font-size:.95em}
.tg-tabs a:hover{border-color:var(--blue);color:var(--blue-d);text-decoration:none}
.tg-tabs a.on{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:700}

.tg-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:28px 0 14px}
.tg-head .page-title{margin:0}
.tg-head .more{font-size:.95em}
.tg-sec{margin-top:8px}
.tg-crumb{font-size:.9em;color:var(--mut);margin-bottom:10px}
.tg-crumb a{color:var(--mut)}

/* 목록 (질문 · 소식 · 게시글) */
.tg-list{list-style:none;margin:0;padding:0;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}
.tg-list > li{border-top:1px solid var(--line-soft)}
.tg-list > li:first-child{border-top:0}
.tg-list a.tg-row{display:grid;grid-template-columns:1fr auto;gap:4px 14px;padding:14px 18px;color:var(--ink)}
.tg-list a.tg-row:hover{background:#f7f8ff;text-decoration:none}
.tg-row .tt{font-weight:700}
.tg-row .sub{grid-column:1/-1;color:var(--mut);font-size:.9em;display:flex;flex-wrap:wrap;gap:4px 12px}
.tg-row .ex{grid-column:1/-1;color:var(--ink-soft);font-size:.93em;margin:2px 0 0}

.tg-st{display:inline-block;padding:2px 10px;border-radius:999px;font-size:.82em;font-weight:700;white-space:nowrap;align-self:start}
.tg-st.open{background:#fff4dc;color:#8a6100}
.tg-st.answered{background:#e3f6ee;color:#17734f}
.tg-st.closed,.tg-st.private{background:#eef1f5;color:var(--ink-soft)}
.tg-st.hidden{background:#fde7eb;color:#a5223a}
.tg-pill{display:inline-block;padding:2px 10px;border-radius:999px;background:var(--blue-l);color:var(--blue-d);font-size:.85em}

/* 「이런 때는 이렇게」 카드 */
.tg-tips{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:16px}
.tg-tip{display:flex;flex-direction:column;gap:8px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:18px;color:var(--ink);box-shadow:0 6px 20px #34394f0d}
.tg-tip:hover{border-color:var(--blue);text-decoration:none}
.tg-tip .tq{font-weight:800;font-size:1.05em;line-height:1.45}
.tg-tip .tq::before{content:"Q. ";color:#a57300}
.tg-tip p{margin:0;color:var(--ink-soft);font-size:.93em}
.tg-tip .by{margin-top:auto;color:var(--mut);font-size:.85em}

/* 글 본문 · 상세 */
.tg-article{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:26px 28px;box-shadow:0 6px 20px #34394f0d}
.tg-article h1{font-size:1.45em;line-height:1.45;margin:0 0 8px;letter-spacing:-.5px}
.tg-article > h3{font-size:1.08em;margin:22px 0 8px}
.tg-article > h3:first-child{margin-top:0}
.tg-article .meta{color:var(--mut);font-size:.9em;display:flex;flex-wrap:wrap;gap:4px 14px;margin-bottom:16px}
.tg-article .body{white-space:pre-wrap;line-height:1.8}
.tg-article .html{line-height:1.8}
.tg-article .html img{border-radius:10px}
.tg-article .cover{margin:-6px 0 18px;border-radius:10px;overflow:hidden;background:#eceeff;display:flex;justify-content:center}
.tg-article .cover img{max-height:280px;width:auto;object-fit:contain}
.tg-answer{margin-top:16px;border:1px solid #cfd5ff;background:#f6f7ff;border-radius:var(--radius);padding:18px 20px}
.tg-answer .who{display:flex;align-items:center;gap:10px;font-weight:700;margin-bottom:8px}
.tg-answer .who img{width:40px;height:40px;border-radius:50%;object-fit:cover;object-position:center top;background:#fff}
.tg-answer .who small{color:var(--mut);font-weight:400}
.tg-answer .body{white-space:pre-wrap;line-height:1.8}
.tg-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;align-items:center}
.tg-actions form{display:inline}
.tg-note{background:#fff8e6;border:1px solid #f1dfaa;border-radius:10px;padding:12px 16px;color:#6b5200;font-size:.93em;margin:12px 0}

/* 폼 */
.tg-form textarea,.tg-form input[type=text],.tg-form input[type=password],.tg-form select{width:100%}
.tg-radio{display:flex;flex-wrap:wrap;gap:8px 18px}
.tg-radio label{display:inline-flex;align-items:center;gap:6px;font-weight:500;color:var(--ink)}
.tg-check{display:flex;align-items:flex-start;gap:8px;margin:8px 0;font-size:.95em}
.tg-check input{margin-top:4px}
.tg-check a{text-decoration:underline}

/* 히어로 그림 (함께하기 공용) */
.hero.tg-hero .photo img{max-height:92%;width:auto;max-width:100%;object-fit:contain}

/* 지역 필터 · 소식 카드 */
.chips.tg-chips{justify-content:flex-start}
.card .thumb.tg-ill{background:#eceeff}
.card .thumb.tg-ill img{object-fit:contain}
a.card{display:block;color:var(--ink)}
a.card:hover{border-color:var(--blue);text-decoration:none}

/* 모임 상세 */
.tg-meet{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:24px;align-items:start}
.tg-meet .pic{background:#eceeff;border-radius:var(--radius);overflow:hidden;display:flex;justify-content:center}
.tg-meet .pic img{max-height:320px;width:auto;object-fit:contain}
.tg-meet .lc{color:#a57300;font-weight:600;margin-bottom:4px}
.tg-dl{display:grid;grid-template-columns:72px 1fr;gap:6px 12px;margin:12px 0}
.tg-dl dt{color:var(--mut)}
.tg-dl dd{margin:0}

/* 게시판 댓글 */
.tg-comments{list-style:none;margin:12px 0 0;padding:0}
.tg-comments li{padding:12px 0;border-top:1px solid var(--line-soft)}
.tg-comments .who{font-weight:700;font-size:.93em}
.tg-comments .who small{color:var(--mut);font-weight:400;margin-left:6px}
.tg-comments .body{white-space:pre-wrap;margin:4px 0}
.tg-linkbtn{background:none;border:0;padding:0;color:var(--mut);font-size:.85em;text-decoration:underline;cursor:pointer}
.tg-linkbtn:hover{background:none;color:var(--bad)}
.tg-report summary{cursor:pointer;color:var(--mut);font-size:.85em;text-decoration:underline;display:inline}
.tg-report[open]{display:block;margin-top:8px}
.tg-report form{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.tg-report input{flex:1;min-width:160px}

/* 마이페이지 */
.tg-kids{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;margin-bottom:16px}
.tg-kid{display:flex;gap:12px;align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:14px}
.tg-kid img{width:56px;height:56px;object-fit:contain;flex:none}
.tg-kid .nm{font-weight:800}
.tg-kid p{margin:2px 0;font-size:.92em;color:var(--ink-soft)}
.tg-badges{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.tg-badge{text-align:center;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:14px 10px}
.tg-badge img{width:72px;height:72px;object-fit:contain}
.tg-badge .nm{font-weight:800;margin-top:4px}
.tg-badge p{margin:2px 0 0;font-size:.85em;color:var(--mut)}
.tg-badge.locked img{filter:grayscale(1);opacity:.35}
.tg-badge.locked .nm{color:var(--mut)}
.tg-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}
.tg-stat{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:16px;text-align:center}
.tg-stat b{display:block;font-size:1.7em;color:var(--blue-d)}
.tg-stat span{color:var(--mut);font-size:.9em}
.tg-progress{height:12px;border-radius:999px;background:#e9ecf5;overflow:hidden;margin:10px 0}
.tg-progress i{display:block;height:100%;background:linear-gradient(90deg,#6a78cf,var(--blue))}
.tg-feedback{margin-top:8px;padding:10px 12px;background:#f6f7ff;border-radius:8px;font-size:.93em}
.tg-feedback b{color:var(--blue-d)}
.tg-types{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.tg-type{display:flex;gap:14px;align-items:center}
.tg-type img{width:84px;height:84px;object-fit:contain;flex:none}
.tg-type h3{font-size:1.1em;margin-bottom:2px}
.tg-type p{margin:2px 0}

/* 이수증 (A4 인쇄) */
.tg-cert-wrap{padding:20px 0 60px;display:flex;flex-direction:column;align-items:center;gap:16px}
.tg-cert{width:min(100%,794px);aspect-ratio:210/297;background:#fff;border:1px solid var(--line);box-shadow:0 10px 30px #34394f1a;padding:7% 8%;position:relative;display:flex;flex-direction:column;text-align:center;font-family:"Nanum Myeongjo","Batang",serif;color:#1d2340}
.tg-cert::before{content:"";position:absolute;inset:18px;border:3px double #b8963d;pointer-events:none}
.tg-cert .no{text-align:left;font-size:.85em;color:#555;font-family:Pretendard,sans-serif}
.tg-cert h1{font-size:2.6em;letter-spacing:.5em;margin:9% 0 8%;padding-left:.5em}
.tg-cert .who{font-size:1.3em;margin-bottom:8%}
.tg-cert .who b{font-size:1.25em;margin-left:.4em}
.tg-cert .txt{font-size:1.15em;line-height:2.1;word-break:keep-all}
.tg-cert .facts{margin:6% auto 0;font-size:.98em;line-height:1.9;font-family:Pretendard,sans-serif;color:#333}
.tg-cert .date{margin-top:auto;font-size:1.15em}
.tg-cert .issuer{margin-top:6%;font-size:1.45em;font-weight:700;position:relative;display:inline-flex;align-items:center;justify-content:center;gap:10px}
.tg-cert .issuer img{width:92px;height:92px;object-fit:contain;margin-left:-8px}

@media (max-width:900px){
  .tg-meet{grid-template-columns:1fr}
}
@media (max-width:560px){
  .tg-badges{grid-template-columns:repeat(2,1fr)}
  .tg-stats{grid-template-columns:1fr}
  .tg-types{grid-template-columns:1fr}
  .tg-article{padding:18px 16px}
  .tg-list a.tg-row{padding:12px 14px}
  .tg-cert{font-size:9px}
  .tg-cert .issuer img{width:56px;height:56px}
}

@media print{
  @page{size:A4;margin:0}
  body{background:#fff}
  .topbar,.site-foot,.tg-noprint,.flash{display:none!important}
  main{padding:0;margin:0}
  .tg-cert-wrap{padding:0}
  .tg-cert{width:210mm;height:297mm;aspect-ratio:auto;border:0;box-shadow:none;font-size:15px;padding:24mm 22mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
