/* 토렌트 자료실·홈 화면. tgram.css / gram.css 의 토큰(og-*) 위에 얹는다. */
:root{--tg-seed:#0a8f4d;--tg-seed-soft:#e6f6ed;--tg-leech:#d1222b;--tg-dead:#8590a6;--tg-gold:#b7791f;--tg-gold-soft:#fdf6e3}
.tg-badge-count{display:inline-grid;place-items:center;min-width:17px;height:17px;padding:0 5px;border-radius:999px;background:var(--og-seal);color:#fff;font-size:10.5px;font-weight:700;line-height:1}
.og-nav-more.is-active>summary{color:var(--og-ink)}

/* 히어로 */
.tg-hero .og-hero-inner{padding-top:44px}
.tg-hero .og-search{max-width:820px}
.tg-hero .og-search select{flex:none;width:132px;height:54px;border:0;border-right:1px solid var(--og-line);background:transparent;color:var(--og-ink);font-size:15px;font-weight:600;padding:0 12px 0 16px;outline:none}
.tg-hero-compact .og-hero-inner{padding:30px 0 30px}
.tg-hero-compact .og-hero-copy h1{font-size:30px}
.tg-hero-compact .og-search{margin-top:18px}
.tg-hero-compact .og-tally{display:none}

/* 필터 */
.tg-filter-count{margin-left:5px;font-size:11.5px;font-weight:500;color:var(--og-faint);font-variant-numeric:tabular-nums}
.og-region-options>a.is-selected .tg-filter-count{color:inherit;opacity:.75}
.og-region-options>a .iconify,.og-region-all .iconify{font-size:17px;margin-right:5px;flex:none}
.tg-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.tg-toolbar h2,.tg-toolbar h3{font-size:22px;font-weight:850;letter-spacing:-.035em;display:flex;align-items:baseline;gap:8px;margin:0}
.tg-toolbar-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tg-chip{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:6px 12px;border:1px solid var(--og-line);border-radius:5px;background:#fff;font-size:12.5px;font-weight:600;color:var(--og-muted);white-space:nowrap}
.tg-chip:hover{border-color:#afbacf}
.tg-chip.is-selected{background:var(--og-blue);border-color:var(--og-blue);color:#fff!important}
.tg-chip .og-icon{width:14px;height:14px}

/* 자료 목록 */
.tg-list{background:#fff;border:1px solid var(--og-line);border-radius:12px;overflow:hidden}
.tg-table{width:100%;border-collapse:collapse;table-layout:fixed}
.tg-table th{padding:12px 10px;background:#f3f5f9;border-bottom:1px solid var(--og-line);font-size:12.5px;font-weight:650;color:var(--og-muted);text-align:center;white-space:nowrap}
.tg-table td{padding:13px 10px;border-bottom:1px solid #ebeef3;font-size:13px;color:var(--og-muted);text-align:center;vertical-align:middle;font-variant-numeric:tabular-nums}
.tg-table tbody tr:last-child td{border-bottom:0}
.tg-table tbody tr:hover{background:#f8f9fc}
.tg-table .tg-col-cat{width:92px}.tg-table .tg-col-size{width:86px}.tg-table .tg-col-num{width:58px}.tg-table .tg-col-date{width:70px}.tg-table .tg-col-user{width:110px}.tg-table .tg-col-rank{width:46px}
.tg-table td.tg-title{text-align:left;overflow:hidden}
.tg-title-line{display:flex;align-items:center;gap:6px;min-width:0}
.tg-title-line>a{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:14.5px;font-weight:600;color:var(--og-ink)}
.tg-title-line>a:hover{color:var(--og-blue)}
.tg-title-line>a:visited{color:#5d6880}
.tg-title-meta{display:flex;align-items:center;gap:8px;margin-top:3px;font-size:11.5px;color:var(--og-faint);min-width:0;overflow:hidden;white-space:nowrap}
.tg-title-meta .tg-tag{color:var(--og-faint)}
.tg-comment-count{flex:none;font-size:12px;font-weight:700;color:var(--og-seal)}
.tg-cat{display:inline-flex;align-items:center;justify-content:center;gap:4px;max-width:100%;padding:3px 8px;border-radius:4px;background:#f3f5f9;color:var(--tg-cat,var(--og-muted));font-size:11.5px;font-weight:700;white-space:nowrap}
.tg-cat .iconify{font-size:13px}
.tg-flag{flex:none;display:inline-flex;align-items:center;padding:2px 6px;border-radius:4px;font-size:10.5px;font-weight:800;letter-spacing:.02em;line-height:1.5}
.tg-flag-free{background:var(--tg-seed-soft);color:var(--tg-seed)}
.tg-flag-new{background:#fceced;color:var(--og-seal)}
.tg-flag-notice{background:var(--og-ink);color:#fff}
.tg-flag-quality{background:var(--og-blue-soft);color:var(--og-blue)}
.tg-flag-pending{background:var(--tg-gold-soft);color:var(--tg-gold)}
.tg-flag-rejected{background:#eef0f4;color:var(--tg-dead)}
.tg-seed,.tg-table td.tg-seed,.tg-facts dd.tg-seed{color:var(--tg-seed);font-weight:700}.tg-leech,.tg-table td.tg-leech,.tg-facts dd.tg-leech{color:var(--tg-leech);font-weight:700}.tg-dead,.tg-table td.tg-dead,.tg-facts dd.tg-dead{color:var(--tg-dead);font-weight:500}
.tg-table tr.is-highlighted{background:linear-gradient(90deg,var(--tg-gold-soft),#fff 70%)}
.tg-table tr.is-highlighted .tg-title-line>a{color:#8a5a12}
.tg-table tr.is-notice{background:#f8f9fc}
.tg-user{display:inline-flex;align-items:center;gap:4px;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--og-muted)}
.tg-user img{width:16px;height:16px;flex:none;object-fit:contain}
.tg-rank-no{font-weight:800;color:var(--og-faint)}
.tg-rank-no.is-top{color:var(--og-seal)}
.tg-list-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px}
.tg-list-foot .pagination{margin:0}
.tg-mobile-meta{display:none}

/* 인기 자료 카드 */
.tg-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.tg-card{display:flex;flex-direction:column;min-width:0;background:#fff;border:1px solid var(--og-line);border-radius:10px;overflow:hidden}
.tg-card:hover{border-color:#afbacf;box-shadow:0 4px 16px #13213f0c}
.tg-card-cover{position:relative;display:block;aspect-ratio:16/9;background:repeating-linear-gradient(-45deg,#edf0f6,#edf0f6 7px,#f7f8fb 7px,#f7f8fb 14px);overflow:hidden}
.tg-card-cover img{display:block;width:100%;height:100%;object-fit:cover}
.tg-card-cover .tg-card-fallback{position:absolute;inset:0;display:grid;place-items:center;color:var(--tg-cat,#8590a6)}
.tg-card-cover .tg-card-fallback .iconify{font-size:44px;opacity:.55}
.tg-card-cover .tg-card-rank{position:absolute;top:10px;left:10px;display:grid;place-items:center;width:26px;height:26px;border-radius:5px;background:var(--og-seal);color:#fff;font-size:13px;font-weight:800}
.tg-card-body{display:flex;flex-direction:column;gap:8px;padding:14px 14px 12px;min-width:0;flex:1}
.tg-card-body h4{font-size:15px;font-weight:750;line-height:1.4;letter-spacing:-.02em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:42px}
.tg-card-stats{display:flex;align-items:center;gap:10px;margin-top:auto;padding-top:10px;border-top:1px solid #ebeef3;font-size:12px;color:var(--og-faint);font-variant-numeric:tabular-nums}
.tg-card-stats span{display:inline-flex;align-items:center;gap:2px}
.tg-card-stats .og-icon{width:13px;height:13px}
.tg-card-stats>span:last-child{margin-left:auto}

/* 홈 구획 */
.tg-home{padding-top:32px;padding-bottom:64px}
.tg-section{margin-top:40px}
.tg-section:first-child{margin-top:0}
.tg-home-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}
.tg-side{display:grid;gap:20px}
.tg-panel{background:#fff;border:1px solid var(--og-line);border-radius:12px;overflow:hidden}
.tg-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 18px;border-bottom:1px solid #ebeef3}
.tg-panel-head h2,.tg-panel-head h3{font-size:16px;font-weight:800;margin:0}
.tg-panel-head a{font-size:12px;color:var(--og-faint)}
.tg-panel-body{padding:16px 18px}
.tg-me{display:flex;align-items:center;gap:12px}
.tg-me-avatar{width:48px;height:48px;border-radius:50%;object-fit:cover;background:#edf0f6;flex:none}
.tg-me-name{display:flex;align-items:center;gap:5px;font-size:16px;font-weight:800;min-width:0}
.tg-me-name img{width:18px;height:18px}
.tg-me-rank{font-size:12px;color:var(--og-faint)}
.tg-progress{height:6px;border-radius:999px;background:#ebeef3;overflow:hidden;margin-top:12px}
.tg-progress>i{display:block;height:100%;background:var(--og-blue);border-radius:999px}
.tg-progress-label{display:flex;justify-content:space-between;margin-top:6px;font-size:11.5px;color:var(--og-faint)}
.tg-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px}
.tg-stat-grid>div{padding:10px 12px;border-radius:8px;background:#f3f5f9}
.tg-stat-grid dt{font-size:11.5px;color:var(--og-faint)}
.tg-stat-grid dd{margin:2px 0 0;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-quick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:14px}
.tg-quick a{display:grid;place-items:center;min-height:38px;border:1px solid var(--og-line);border-radius:5px;font-size:12.5px;font-weight:600;color:var(--og-muted)}
.tg-quick a:hover{background:var(--og-blue-soft);border-color:var(--og-blue-soft)}
.tg-login-box .og-button{width:100%}
.tg-login-box p{font-size:13px;color:var(--og-muted);margin-bottom:12px}
.tg-login-links{display:flex;justify-content:center;gap:14px;margin-top:10px;font-size:12px;color:var(--og-faint)}
.tg-rank-tabs{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid #ebeef3}
.tg-rank-tabs button{min-height:40px;border:0;border-bottom:2px solid transparent;background:#fff;font-size:13px;font-weight:650;color:var(--og-faint)}
.tg-rank-tabs button.is-active{color:var(--og-blue);border-bottom-color:var(--og-blue)}
.tgram .tg-rank-list{padding:6px 18px 10px}
.tg-rank-list li{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #f1f3f7;font-size:13px}
.tg-rank-list li:last-child{border:0}
.tg-rank-list .tg-rank-no{width:18px;text-align:center;flex:none}
.tg-rank-list .tg-user{flex:1;min-width:0;color:var(--og-ink)}
.tg-rank-list b{font-weight:700;color:var(--og-blue);font-variant-numeric:tabular-nums;white-space:nowrap}
.tg-rank-empty{padding:26px 0;text-align:center;font-size:13px;color:var(--og-faint)}
.tg-home .og-home-boards{margin-top:0}
.og-home-board li a{display:flex;align-items:center;gap:6px}
.og-home-board li a>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.og-home-board li time{margin-left:auto;flex:none;font-size:12px;color:var(--og-faint);font-variant-numeric:tabular-nums}
.tg-banners{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:32px}
.tg-banners a{display:block;border-radius:10px;overflow:hidden;border:1px solid var(--og-line)}
.tg-banners img{display:block;width:100%;height:auto}
.tg-guest-lock{padding:48px 24px;text-align:center;background:#fff;border:1px dashed var(--og-line);border-radius:12px;color:var(--og-muted)}
.tg-guest-lock p{margin-bottom:16px}

/* 상세 */
.tg-detail{background:#fff;border:1px solid var(--og-line);border-radius:12px;overflow:hidden}
.tg-detail-head{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;padding:28px 28px 22px}
.tg-detail-head.has-poster{grid-template-columns:200px minmax(0,1fr)}
.tg-detail-poster{width:100%;aspect-ratio:2/3;border-radius:8px;object-fit:cover;background:#edf0f6;border:1px solid var(--og-line)}
.tg-detail-topline{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.tg-detail h1{font-size:26px;font-weight:850;line-height:1.35;letter-spacing:-.035em;overflow-wrap:anywhere}
.tg-detail-byline{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;font-size:13px;color:var(--og-faint)}
.tg-detail-byline .tg-user{color:var(--og-ink);font-weight:650}
.tg-detail-byline span{display:inline-flex;align-items:center;gap:4px}
.tg-detail-byline .og-icon{width:14px;height:14px}
.tg-facts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin-top:20px;border:1px solid var(--og-line);border-radius:8px;overflow:hidden}
.tg-facts>div{padding:13px 14px;border-right:1px solid var(--og-line);min-width:0}
.tg-facts>div:last-child{border-right:0}
.tg-facts dt{font-size:12px;color:var(--og-faint)}
.tg-facts dd{margin:3px 0 0;font-size:18px;font-weight:800;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:20px}
.tg-actions .og-button{min-height:46px}
.tg-actions .og-button-magnet{background:var(--og-seal);border-color:var(--og-seal);color:#fff!important}
.tg-actions .og-button-magnet:hover{background:#b81c24}
.tg-actions .og-button.is-on{background:var(--og-blue-soft);border-color:var(--og-blue);color:var(--og-blue)}
.tg-actions-spacer{flex:1}
.tgram .tg-cost-note{margin-top:12px;font-size:13px;color:var(--og-muted)}
.tg-cost-note b{color:var(--og-seal)}
.tg-cost-note .is-free{color:var(--tg-seed);font-weight:700}
.tg-notice-bar{padding:12px 28px;background:var(--tg-gold-soft);color:var(--tg-gold);font-size:13.5px;font-weight:600;border-bottom:1px solid #f1e3bd}
.tg-tabs{display:flex;gap:4px;padding:0 20px;border-top:1px solid var(--og-line);border-bottom:1px solid var(--og-line);background:#f8f9fc;overflow-x:auto}
.tg-tabs button{position:relative;min-height:48px;padding:0 16px;border:0;background:transparent;font-size:14.5px;font-weight:650;color:var(--og-faint);white-space:nowrap}
.tg-tabs button.is-active{color:var(--og-ink)}
.tg-tabs button.is-active::after{content:"";position:absolute;left:16px;right:16px;bottom:-1px;height:3px;background:var(--og-ink);border-radius:3px 3px 0 0}
.tg-tabs button small{margin-left:4px;font-size:12px;font-weight:600;color:var(--og-blue)}
.tg-tab-panel{padding:26px 28px}
.tg-description{font-size:15px;line-height:1.85;color:var(--og-text-secondary,#4b5875);overflow-wrap:anywhere}
.tg-description img{max-width:100%;height:auto;border-radius:6px;margin:10px 0}
.tg-description a{color:var(--og-blue);text-decoration:underline}
.tg-description ul,.tg-description ol{padding-left:22px;list-style:revert}
.tg-description blockquote{margin:12px 0;padding:10px 16px;border-left:3px solid var(--og-line);background:#f8f9fc}
.tg-description pre{padding:12px 14px;border-radius:6px;background:#f3f5f9;overflow-x:auto;font-size:13px}
.tg-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:20px}
.tg-tags a{padding:4px 10px;border:1px solid var(--og-line);border-radius:999px;font-size:12.5px;color:var(--og-muted)}
.tg-hash{display:flex;align-items:center;gap:8px;margin-top:20px;padding:10px 14px;border-radius:6px;background:#f3f5f9;font-size:12.5px;color:var(--og-muted)}
.tg-hash code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--og-ink)}
.tg-hash button{border:0;background:transparent;color:var(--og-blue);font-size:12.5px;font-weight:650;white-space:nowrap}
.tgram .tg-files{padding:0;border:1px solid var(--og-line);border-radius:8px;overflow:hidden}
.tg-files li{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #ebeef3;font-size:13.5px}
.tg-files li:last-child{border:0}
.tg-files li .og-icon{width:16px;height:16px;color:var(--og-faint)}
.tg-files li span{flex:1;min-width:0;overflow-wrap:anywhere}
.tg-files li b{font-weight:600;color:var(--og-faint);font-variant-numeric:tabular-nums;white-space:nowrap}
.tg-files-more{margin-top:10px;font-size:12.5px;color:var(--og-faint)}
.tg-comment-form textarea{display:block;width:100%;min-height:92px;padding:12px 14px;border:1px solid var(--og-line);border-radius:8px;font-size:14px;resize:vertical}
.tg-comment-form-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;font-size:12px;color:var(--og-faint)}
.tg-comments{margin-top:22px}
.tg-comment{padding:16px 0;border-top:1px solid #ebeef3}
.tg-comment.is-reply{margin-left:34px;padding-left:16px;border-left:2px solid #ebeef3}
.tg-comment-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12.5px;color:var(--og-faint)}
.tg-comment-head .tg-user{font-size:13.5px;font-weight:700;color:var(--og-ink)}
.tg-comment-head .tg-flag{font-size:10px}
.tg-comment-head form,.tg-comment-head button{display:inline}
.tg-comment-head button{border:0;background:transparent;padding:0;font-size:12.5px;color:var(--og-faint)}
.tg-comment-head button:hover{color:var(--og-blue)}
.tg-comment-body{margin-top:6px;font-size:14.5px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
.tg-reply-form{margin-top:10px}
.tg-uploader{display:flex;align-items:center;gap:14px;padding:18px 28px;border-top:1px solid var(--og-line);background:#f8f9fc}
.tg-uploader img.tg-me-avatar{width:44px;height:44px}
.tg-uploader dl{display:flex;gap:18px;margin:0 0 0 auto;font-size:12px;color:var(--og-faint)}
.tg-uploader dd{margin:1px 0 0;font-size:14px;font-weight:750;color:var(--og-ink);font-variant-numeric:tabular-nums}
.tg-related{margin-top:32px}
.tg-peer-table td,.tg-peer-table th{font-size:12.5px;padding:10px 8px}
.tg-dialog{width:min(520px,calc(100% - 32px));padding:0;border:0;border-radius:12px;box-shadow:0 24px 80px #13213f40;color:var(--og-ink)}
.tg-dialog::backdrop{background:#0b1b3d80}
.tg-dialog-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--og-line)}
.tg-dialog-head h2{font-size:17px;font-weight:800}
.tg-dialog-body{padding:20px}
.tg-dialog-foot{display:flex;justify-content:flex-end;gap:8px;padding:14px 20px;border-top:1px solid var(--og-line)}

/* 등록 폼 */
.tg-form{display:grid;gap:22px;padding:28px;background:#fff;border:1px solid var(--og-line);border-radius:12px}
.tg-field{display:grid;gap:7px;min-width:0}
.tg-field>label,.tg-field>.tg-label{font-size:14px;font-weight:700}
.tg-field>label em,.tg-field>.tg-label em{font-style:normal;color:var(--og-seal);margin-left:2px}
.tg-field input[type=text],.tg-field input[type=number],.tg-field select,.tg-field textarea{width:100%;min-height:46px;padding:10px 13px;border:1px solid var(--og-line);border-radius:5px;background:#fff;font-size:14px}
.tg-field textarea{min-height:240px;line-height:1.7;resize:vertical}
.tg-help{font-size:12.5px;color:var(--og-faint)}
.tg-field-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.tg-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:30px 20px;border:2px dashed #c6cfdf;border-radius:10px;background:#f8f9fc;text-align:center;color:var(--og-muted);cursor:pointer;transition:border-color .15s,background .15s}
.tg-drop:hover,.tg-drop.is-over{border-color:var(--og-blue);background:var(--og-blue-soft)}
.tg-drop .og-icon{width:34px;height:34px;color:var(--og-blue)}
.tg-drop strong{font-size:15px;color:var(--og-ink)}
.tg-drop input{position:absolute;width:1px;height:1px;opacity:0}
.tg-parsed{padding:14px 16px;border:1px solid var(--og-line);border-radius:8px;background:#fff;font-size:13px}
.tg-parsed dl{display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px 12px;margin:0}
.tg-parsed dt{color:var(--og-faint)}.tg-parsed dd{margin:0;overflow-wrap:anywhere}
.tgram .tg-parsed ul{margin-top:10px;padding-top:10px;border-top:1px solid #ebeef3;max-height:180px;overflow-y:auto}
.tg-parsed li{display:flex;justify-content:space-between;gap:12px;padding:3px 0;color:var(--og-muted)}
.tg-check{display:flex;align-items:flex-start;gap:9px;font-size:13.5px;line-height:1.6;color:var(--og-muted)}
.tg-check input{margin-top:4px;width:16px;height:16px;flex:none;accent-color:var(--og-blue)}
.tg-agree{padding:16px 18px;border-radius:8px;background:#fceced;color:#7d1a20}
.tg-agree .tg-check{color:#7d1a20;font-weight:600}
.tg-form-foot{display:flex;justify-content:flex-end;gap:8px;padding-top:6px;border-top:1px solid #ebeef3}
.tg-form-foot .og-button{min-width:120px;margin-top:16px}
.tg-reward-note{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:8px;background:var(--og-blue-soft);color:var(--og-blue);font-size:13.5px;font-weight:600}
.tg-reward-note .og-icon{width:17px;height:17px}

/* 내 자료 */
.tg-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:#fff;border:1px solid var(--og-line);border-radius:12px;overflow:hidden;margin-bottom:20px}
.tg-summary>div{padding:16px 18px;border-right:1px solid #ebeef3;min-width:0}
.tg-summary>div:last-child{border-right:0}
.tg-summary dt{font-size:12.5px;color:var(--og-faint)}
.tg-summary dd{margin:4px 0 0;font-size:20px;font-weight:850;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-announce{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 18px;margin-bottom:24px;background:#fff;border:1px solid var(--og-line);border-radius:12px;font-size:13px;color:var(--og-muted)}
.tg-announce code{flex:1;min-width:200px;padding:8px 12px;border-radius:5px;background:#f3f5f9;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;color:var(--og-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-row-actions{display:inline-flex;gap:6px}
.tg-row-actions a,.tg-row-actions button{display:inline-grid;place-items:center;width:30px;height:30px;border:1px solid var(--og-line);border-radius:5px;background:#fff;color:var(--og-muted)}
.tg-row-actions .og-icon{width:15px;height:15px}

/* 레이어 팝업 */
.tg-popup{position:absolute;z-index:70;background:#fff;border:1px solid var(--og-line);border-radius:10px;box-shadow:0 18px 60px #13213f33;overflow:hidden}
.tg-popup.is-center{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%)}
.tg-popup-body{overflow-y:auto}
.tg-popup-body img{display:block;width:100%;height:auto}
.tg-popup-content{padding:18px 20px;font-size:14px;line-height:1.7}
.tg-popup-foot{display:flex;justify-content:space-between;gap:10px;padding:10px 14px;background:var(--og-ink)}
.tg-popup-foot button{border:0;background:transparent;color:#fff;font-size:12.5px}
.tg-popup-foot button:last-child{margin-left:auto}

@media(max-width:1100px){
    .tg-home-grid{grid-template-columns:minmax(0,1fr) 260px}
    .tg-table .tg-col-user{width:88px}
}
@media(max-width:960px){
    .tg-home-grid{grid-template-columns:minmax(0,1fr)}
    .tg-side{grid-template-columns:repeat(2,minmax(0,1fr))}
    .tg-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .tg-table .tg-col-completed,.tg-table .tg-hide-md{display:none}
}
@media(max-width:767px){
    .tg-hero .og-search select{width:96px;height:46px;font-size:13px;padding:0 6px 0 10px}
    .tg-hero-compact .og-hero-copy h1{font-size:24px}
    .tg-home{padding-top:22px;padding-bottom:40px}
    .tg-section{margin-top:30px}
    .tg-side{grid-template-columns:minmax(0,1fr)}
    .tg-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
    .tg-card-body{padding:11px 11px 10px}.tg-card-body h4{font-size:14px;min-height:39px}
    .tg-banners{grid-template-columns:minmax(0,1fr)}
    .tg-toolbar h2,.tg-toolbar h3{font-size:20px}
    /* 표를 카드형 행으로 */
    .tg-table,.tg-table tbody{display:block}
    .tg-table thead,.tg-table colgroup{display:none}
    .tg-table tr{display:block;padding:13px 14px;border-bottom:1px solid #ebeef3}
    .tg-table tbody tr:last-child{border-bottom:0}
    .tg-table td{display:none;padding:0;border:0;text-align:left}
    .tg-table td.tg-title{display:block}
    .tg-title-line>a{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:15px;line-height:1.45}
    .tg-title-line{align-items:flex-start}
    .tg-title-meta{display:none}
    .tg-mobile-meta{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:7px;font-size:12px;color:var(--og-faint)}
    .tg-mobile-meta .tg-cat{padding:2px 6px;font-size:11px}
    .tg-mobile-meta span{display:inline-flex;align-items:center;gap:2px}
    .tg-mobile-meta .og-icon{width:12px;height:12px}
    .tg-detail-head,.tg-detail-head.has-poster{grid-template-columns:minmax(0,1fr);padding:20px 18px 18px}
    .tg-detail-poster{width:130px}
    .tg-detail h1{font-size:21px}
    .tg-facts{grid-template-columns:repeat(3,minmax(0,1fr))}
    .tg-facts>div{border-bottom:1px solid var(--og-line)}
    .tg-facts>div:nth-child(3){border-right:0}
    .tg-facts>div:nth-child(n+4){border-bottom:0}
    .tg-facts dd{font-size:16px}
    .tg-actions .og-button-primary,.tg-actions .og-button-magnet{flex:1}
    .tg-actions-spacer{display:none}
    .tg-tabs{padding:0 6px}.tg-tabs button{padding:0 12px;font-size:14px}
    .tg-tab-panel{padding:20px 18px}
    .tg-notice-bar{padding:12px 18px}
    .tg-uploader{flex-wrap:wrap;padding:16px 18px}.tg-uploader dl{margin-left:0;width:100%}
    .tg-comment.is-reply{margin-left:14px;padding-left:12px}
    .tg-form{padding:20px 18px}
    .tg-field-row{grid-template-columns:minmax(0,1fr)}
    .tg-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
    .tg-summary>div{border-bottom:1px solid #ebeef3}
    .tg-summary>div:nth-child(2n){border-right:0}
    .tg-summary>div:last-child{grid-column:1/-1;border-bottom:0}
    .tg-summary dd{font-size:17px}
    .tg-popup:not(.is-center){left:12px!important;top:80px!important}
}

/* 로고: 여백 없는 SVG(271×60)라 잘라내지 않고 높이에 맞춘다 */
.og-brand,.og-footer .og-brand{width:auto}
.og-brand img{width:auto;height:38px;margin-left:0;object-fit:contain}
.og-footer .og-brand img{width:auto;height:30px;margin-left:0}
@media(max-width:860px){.og-brand{width:auto}.og-brand img{width:auto;height:30px;margin-left:0}}

/* 배너 위치 */
.tg-banner-slot{display:grid;gap:12px}
.tg-banner-slot a{display:block;border:1px solid var(--og-line);border-radius:10px;overflow:hidden}
.tg-banner-slot img{display:block;width:100%;height:auto}
.tg-banner-content_top{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));margin-bottom:24px}

/* 홈의 카테고리 바: 모바일에서도 시트로 숨기지 않고 가로로 넘겨 본다 */
.tg-home-cats{margin-bottom:32px}
@media(max-width:767px){
    .tg-home-cats{position:static;visibility:visible;transform:none;max-height:none;border-radius:12px;overflow:hidden;margin-bottom:22px}
    .tg-home-cats .og-filter-section{display:flex;align-items:center;gap:6px;padding:10px 12px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
    .tg-home-cats .og-filter-section::-webkit-scrollbar{display:none}
    .tg-home-cats .og-filter-label{display:none}
    .tg-home-cats .og-region-all,.tg-home-cats .og-region-options>a{flex:none;min-height:38px;padding:8px 12px;white-space:nowrap;font-size:13px}
    .tg-home-cats .og-region-all>.og-icon:last-child{margin-left:0}
    .tg-home-cats .og-region-options{display:flex;flex-wrap:nowrap;gap:4px;margin:0}
}

/* 모바일 전체 메뉴: 맨 위에 로그인·회원가입(또는 내 정보) */
.tg-mobile-account{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding-bottom:10px;margin-bottom:4px;border-bottom:1px solid var(--og-line)}
.og-mobile-menu .tg-mobile-account>.og-button{min-height:46px;padding:11px 12px;background:#fff;font-size:14px;font-weight:700}
.og-mobile-menu .tg-mobile-account>.og-button-primary{background:var(--og-blue)}
.og-mobile-menu .tg-mobile-me{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:12px;background:var(--og-blue-soft);font-size:15px}
.og-mobile-menu .tg-mobile-me span{font-size:12.5px;color:var(--og-muted)}
.tg-mobile-account-links{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.og-mobile-menu .tg-mobile-account-links a{padding:10px 4px;text-align:center;font-size:12.5px}
.tgram .tg-actions .og-button{white-space:nowrap}

/* 상세 화면 버튼: PC 는 한 줄, 모바일은 받기 버튼 한 줄 + 보조 버튼 한 줄(같은 너비) */
.tg-actions-main,.tg-actions-sub{display:contents}
@media(max-width:767px){
    .tgram .tg-actions{display:block}
    .tg-actions-main{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px}
    .tgram .tg-actions-main .og-button{min-height:50px;padding:0 10px;font-size:15px;font-weight:700}
    .tg-actions-sub{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
    .tg-actions-sub>.tg-actions-spacer{display:none}
    .tg-actions-sub>*{flex:1 1 62px;min-width:0}
    .tgram .tg-actions-sub .og-button{width:100%;min-height:44px;padding:0 4px;gap:4px;font-size:12.5px;font-weight:600;color:var(--og-muted)}
    .tgram .tg-actions-sub .og-button .og-icon{width:15px;height:15px}
    .tgram .tg-actions-sub .og-button.is-on{color:var(--og-blue)}
}
