/* 2. 찾기: 검색, 검색 결과, 분류 선택과 편집. */
body.in-search #portalBody .list-title-text mark{background:rgba(245,196,0,.38);color:inherit;border-radius:3px;padding:0 1px}
body.in-search{padding-bottom:30px}
body.in-search #spage .sbar2{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:8px;padding:4px 14px 10px;background:var(--bg);border:0;box-shadow:none;backdrop-filter:none}
body.in-search #spage #sBack{display:flex;align-items:center;justify-content:center;flex:none;width:23px;height:23px;min-width:0;min-height:0;padding:0;border:0;border-radius:0;color:var(--text);background:none}
body.in-search #spage #sBack svg{width:23px;height:23px;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.in-search #spage .sinput{display:flex;align-items:center;gap:8px;flex:1;min-width:0;height:38px;padding:10px 12px;background:var(--elev);border:0;border-radius:10px;box-shadow:inset 0 0 0 1.5px var(--text)}
body.in-search #spage .sinput:focus-within{box-shadow:inset 0 0 0 1.5px var(--text)}
body.in-search #spage .sinput>svg{display:block;width:18px;height:18px;flex:none;color:var(--dim);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.in-search #spage #sq{display:block;width:100%;min-width:0;min-height:0;height:18px;margin:0;padding:0;border:0;outline:0;border-radius:0;background:none;box-shadow:none;color:var(--text);font-family:inherit;font-size:15px;font-weight:400;line-height:18px;letter-spacing:0}
body.in-search #spage #sq::placeholder{color:var(--dim)}
body.in-search #spage #sClear,body.in-search #searchSuggestions{display:none!important}
body.in-search #spage #sbody:not(:has(#sres)){padding:6px 16px 0}
body.in-search #spage .shead{display:flex;align-items:center;justify-content:space-between;gap:0;margin:0;padding:14px 0 8px;min-height:0;border:0;font-size:14px;font-weight:700;line-height:normal;letter-spacing:0}
body.in-search #spage .shead b{font-size:14px;font-weight:700;line-height:normal;letter-spacing:0}
body.in-search #spage .shead button,body.in-search #spage .shead .sub{padding:0;margin:0;min-height:0;background:none;border:0;font-size:12.5px;font-weight:500;color:var(--dim);line-height:normal}
body.in-search #spage #trendbox .shead{padding-top:26px}
body.in-search #spage #trendbox .shead>span{width:100%;justify-content:space-between}
body.in-search #spage #tRefresh{display:none}
body.in-search #spage .schips{display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:0}
body.in-search #spage .schip{display:flex;align-items:center;gap:6px;min-height:0;padding:7px 12px;border:0;border-radius:999px;background:var(--elev);color:var(--muted);font-size:14px;font-weight:400;line-height:normal;letter-spacing:0}
body.in-search #spage .schip .x{display:flex;align-items:center;justify-content:center;width:13px;height:13px;padding:0;border-radius:0;background:none;color:var(--dim)}
body.in-search #spage .schip .x svg{width:13px;height:13px;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.in-search #spage .trend{display:grid;grid-template-columns:1fr 1fr;column-gap:14px;row-gap:0;grid-auto-rows:40px;margin:0;padding:0}
body.in-search #spage .trow{display:flex;align-items:center;gap:9px;width:100%;height:40px;min-height:0;margin:0;padding:0;border:0;border-bottom:1px solid var(--ln2);border-radius:0;background:none;text-align:left;font-size:14.5px;line-height:normal;white-space:nowrap;overflow:hidden}
body.in-search #spage .trow .rk{width:14px;flex:none;text-align:left;color:var(--dim);font-size:14.5px;font-weight:800;line-height:normal}
body.in-search #spage .trow .rk.hot3{color:var(--pt);font-size:14.5px}
body.in-search #spage .trow .kw{font-size:14.5px;font-weight:400;line-height:normal;letter-spacing:0}
body.in-search #spage .trow .df{display:none}
body.in-search #spage #searchFilters{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;margin:0;padding:2px 16px 8px!important}
body.in-search #spage #searchFilters[hidden],body.in-search #spage #searchResultCount[hidden]{display:none}
body.in-search #spage #searchFilters select{appearance:none;min-height:0;max-width:calc((100vw - 48px)/3);height:30px;margin:0;padding:7px 30px 7px 12px;border:0;border-radius:999px;background:var(--elev);color:var(--muted);font-family:inherit;font-size:13px;font-weight:600;line-height:16px;letter-spacing:0;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d636d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-size:14px;background-position:right 12px center;background-repeat:no-repeat}
body.in-search #spage #searchCategory{order:0;background-color:var(--line);color:var(--text)}
body.in-search #spage #searchPeriod{order:1}
body.in-search #spage #searchSort{order:2}
body.in-search #spage #searchResultCount{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
body.in-search #spage #sres .endmsg{color:var(--dim);font-size:12px}
#sheetbg.section2-category-sheet{background:rgba(0,0,0,.45);align-items:flex-end}
#sheetbg.section2-category-sheet .sheet{width:100%;max-width:720px;margin:0 auto;padding:10px 16px 30px;border:0;border-radius:22px 22px 0 0;background:var(--bg);color:var(--text);box-shadow:none}
#sheetbg.section2-category-sheet .grab{width:40px;height:4px;margin:0 auto 14px;border-radius:2px;background:var(--line)}
.section2-category-sheet h2{margin:0;padding:0;font-size:17px;font-weight:700;line-height:normal;letter-spacing:0}
.section2-category-sheet p{margin:3px 0 14px;padding:0;color:var(--dim);font-size:13px;line-height:normal}
.section2-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.section2-category-grid button{display:flex;align-items:center;justify-content:center;min-height:0;height:46px;padding:0;border:0;border-radius:10px;background:var(--elev);color:var(--muted);font:inherit;font-size:15px;font-weight:500;line-height:normal;letter-spacing:0}
.section2-category-grid button.on{background:var(--line);color:var(--text);font-weight:700}
body.section2-categories #xpage{padding:0}
.section2-cat-top{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;padding:4px 14px 10px;border-bottom:1px solid var(--line);background:var(--bg)}
.section2-cat-top>button:first-child{display:flex;align-items:center;justify-content:center;width:23px;height:23px;padding:0;border:0;background:none;color:var(--text)}
.section2-cat-top svg{width:23px;height:23px}
.section2-cat-top>b{font-size:16px;font-weight:700;line-height:normal}
.section2-cat-done{padding:7px 16px;border:0;border-radius:999px;background:var(--text);color:var(--bg);font:inherit;font-size:14px;font-weight:700;line-height:normal}
.section2-cat-help{margin:0;padding:16px 16px 12px;color:var(--muted);font-size:14px;line-height:1.5}
.section2-cat-row{display:flex;align-items:center;gap:10px;padding:13px 16px;border-bottom:1px solid var(--ln2);font-size:15.5px;line-height:normal}
.section2-cat-row .gp{display:flex;align-items:center;width:22px;min-width:22px;min-height:0;height:26px;padding:0;border:0;background:none;color:var(--dim);touch-action:none;cursor:grab}
.section2-cat-row .gp svg{width:18px;height:18px}
.section2-cat-row .nm{flex:1}
.section2-cat-row .swt{position:relative;display:inline-block;flex:none;width:44px;height:26px;min-height:0;padding:0;border:0;border-radius:13px;background:var(--line)}
.section2-cat-row .swt:after{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25)}
.section2-cat-row .swt[aria-checked=true]{background:var(--text)}
.section2-cat-row .swt[aria-checked=true]:after{left:21px;background:var(--bg)}
.section2-cat-row .swt:disabled{opacity:.4}
.section2-cat-row.dragging{opacity:.5}
/* Match the recent-query line box to its 16px icon plus 4px button padding. */
body.in-search #spage .portal-recent>button[data-query]{display:block;min-height:24px;line-height:24px;padding:0}
body.in-search #spage .portal-recent>button[data-remove-recent]{align-items:center;justify-content:center;min-height:24px;line-height:1}
body.in-search #spage .portal-recent svg{display:block}

/* Site search: match the home search field; keep all search controls. */
@media(max-width:999px){html body.in-search #spage.portal-search>.sbar2.portal-bar{display:block!important;padding:calc(env(safe-area-inset-top,0px) + 10px) 16px 12px!important}html body.in-search #spage.portal-search{padding-top:66px!important}}
#spage.portal-search .portal-ring{box-sizing:border-box;height:44px;padding:0;border:1.5px solid var(--lk);border-radius:8px;background:none}
html body.in-search #spage.portal-search .portal-bar .sinput{display:flex;align-items:center;gap:8px;flex:none;height:100%!important;min-height:0!important;box-sizing:border-box;margin:0;padding:0 14px 0 8px;border:0!important;border-radius:6.5px!important;background:var(--bg)!important;box-shadow:none!important;outline:0!important}
html body.in-search #spage.portal-search .portal-bar .sinput>svg{display:block;flex:none;width:22px;height:22px;color:var(--lk);stroke:var(--lk);fill:none;stroke-width:1.8}
html body.in-search #spage.portal-search .portal-bar .sinput>#sBack{display:flex!important;align-items:center;justify-content:center;flex:none;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;margin:0;padding:0!important}
html body.in-search #spage.portal-search .portal-bar .sinput>#sBack svg{width:24px!important;height:24px!important;color:var(--tx);stroke:var(--tx);fill:none}
html body.in-search #spage.portal-search #sq{flex:1;min-width:0;height:100%;padding:0;background:transparent;font-size:15px!important;font-weight:400!important;line-height:normal}
html body.in-search #spage.portal-search #sq::placeholder{color:var(--t3,var(--dim));font-weight:400}
html body.in-search #spage.portal-search #sClear:not([hidden]){display:flex!important;align-items:center;justify-content:center;flex:none;width:18px;height:18px;min-height:0;padding:0;color:var(--t3,var(--dim))}
html body.in-search #spage.portal-search #sClear svg{width:18px;height:18px}
#spage.portal-search .portal-home{display:flex;flex-direction:column;min-height:calc(100vh - 66px);max-width:680px;margin:0 auto;padding:0}
#spage.portal-search .portal-recent{display:flex;align-items:center;gap:12px;height:58px;box-sizing:border-box;padding:0 6px 0 16px;border:0}
#spage.portal-search .portal-recent-ic{flex:none;display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:var(--s,var(--surface))}
#spage.portal-search .portal-recent-ic svg{color:var(--t2,var(--muted));stroke:var(--t2,var(--muted));fill:none}
#spage.portal-search .portal-recent>button[data-query]{flex:1;min-width:0;min-height:0;height:100%;padding:0;font-size:17px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#spage.portal-search .portal-recent>small{flex:none;font-size:14px;color:var(--t3,var(--dim))}
#spage.portal-search .portal-recent>button[data-remove-recent]{display:flex;align-items:center;justify-content:center;flex:none;width:38px;height:38px;min-height:0;padding:0;border-radius:0;background:none;color:var(--t2,var(--muted))}
#spage.portal-search .portal-recent>button[data-remove-recent] svg{color:var(--t2,var(--muted));stroke:var(--t2,var(--muted));fill:none}
#spage.portal-search .portal-gap{height:10px;margin-top:8px;background:var(--s,var(--surface))}
#spage.portal-search .portal-home-title{display:flex;justify-content:space-between;align-items:center;padding:22px 16px 6px}
#spage.portal-search .portal-home-title b{font-size:20px;font-weight:800;letter-spacing:-.03em}
#spage.portal-search .portal-home-title span{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:400;color:var(--t3,var(--dim))}
#spage.portal-search .portal-home-title span svg{color:var(--t3,var(--dim));stroke:var(--t3,var(--dim));fill:none}
#spage.portal-search .portal-trending{display:block}
#spage.portal-search .portal-trending button{display:flex;align-items:center;gap:14px;width:100%;height:56px;box-sizing:border-box;padding:0 20px 0 16px;border:0;border-radius:0;background:none;text-align:left;cursor:pointer}
#spage.portal-search .portal-trending b{flex:none;width:26px;text-align:center;font-size:16px;font-weight:800}
#spage.portal-search .portal-trending span{flex:1;min-width:0;font-size:17px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#spage.portal-search .portal-trending em{flex:none;font-style:normal;font-size:15px;font-weight:900;color:#ff5a3c}
#spage.portal-search .portal-record{position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding:14px 16px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--ln);background:var(--bg);font-size:14px;color:var(--t2,var(--muted))}
#spage.portal-search .portal-record>span{display:flex;align-items:center;gap:8px;white-space:nowrap}
#spage.portal-search .portal-record>span i{width:3px;height:3px;border-radius:50%;background:var(--t3,var(--dim))}
#spage.portal-search .portal-record button{padding:0;min-height:0;background:none;border:0;font:inherit;font-size:14px;color:var(--t2,var(--muted));cursor:pointer}
#spage.portal-search .portal-record>button[data-close-search]{font-weight:600}
/* 홈 위쪽: 1. 검색창(안에 1위 인기 검색어), 2. 탭(전체·인기·구독·랭킹·클립), 3. 추천 채널 띠. 모바일 전용 */
.dc-home-top,.dc-home-search,.dc-home-trend{display:none}
@media(min-width:1000px){.dc-home-top,.dc-home-search,.dc-home-trend{display:none!important}}
@media(max-width:999.98px){
  .dc-home-search.is-home,.dc-home-trend.is-home{display:block;background:var(--bg,#fff)}
  .dc-home-search .dc-hs{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;width:calc(100% - 32px);height:44px;margin:10px 16px 12px;padding:0 14px;border:1.5px solid var(--lk,#1b64da);border-radius:8px;background:transparent;color:var(--t3,#6b7280);font:inherit;font-size:15px;text-align:left;cursor:pointer}
  .dc-home-search .dc-hs svg{flex:none;color:var(--lk,#1b64da)}
  .dc-hs .dc-hs-t{flex:1;min-width:0;display:flex;align-items:center;gap:8px;overflow:hidden;white-space:nowrap}
  .dc-hs .dc-hs-b{flex:none;padding:3px 7px;border-radius:4px;background:var(--lk,#1b64da);color:#fff;font-size:11px;font-style:normal;font-weight:800}
  .dc-hs .dc-hs-k{min-width:0;height:20px;overflow:hidden}
  .dc-hs .dc-hs-roll{display:block}
  .dc-hs .dc-hs-k b{display:block;height:20px;line-height:20px;overflow:hidden;text-overflow:ellipsis;color:var(--tx,#16181d);font-weight:700}
  .dc-rec{display:flex;align-items:center;gap:14px;overflow-x:auto;scrollbar-width:none;padding:13px 16px;white-space:nowrap;border-bottom:1px solid var(--ln,#eceef1);font-size:15px;font-weight:600}
  .dc-rec[hidden]{display:none}
  .dc-rec .dc-rec-tag{flex:none;padding:3px 10px;border:1.5px solid var(--lk,#1b64da);border-radius:999px;color:var(--lk,#1b64da);font-size:12px;font-weight:700}
  .dc-rec a{flex:none;color:var(--t2,#4b5260);font-weight:600;text-decoration:none}
  .dc-rec a.first{color:var(--tx,#16181d);font-weight:800}
}
/* 모바일 위쪽 바에는 검색 아이콘이 없다(시안). 홈 검색창이 이 버튼을 눌러 검색을 연다 */
@media(max-width:999px){html body header #bSearch{display:none!important}}

/* 홈 탭: 5개 균등 5등분 (전체·인기·구독·랭킹·클립), 선택은 파란 굵은 글자 + 3px 파란 밑줄 (DCLIST 1) */
@media(max-width:999.98px){
  html body:not(.dc-shell) header #chips{border-bottom:1px solid var(--ln,#eceef1)}
  html body:not(.dc-shell) header #chips .v2tb{display:flex!important;width:100%!important;height:45px!important;box-sizing:border-box!important;padding:0!important;gap:0!important;overflow-x:hidden!important}
  html body:not(.dc-shell) header #chips .v2tb.v2tb>*{flex:1 1 0!important;min-width:0!important;width:20%!important;padding:13px 0 12px!important;text-align:center!important;justify-content:center!important;font-size:16px!important;font-weight:500!important;color:var(--tx,#16181d)!important;box-shadow:none!important;white-space:nowrap!important}
  html body:not(.dc-shell) header #chips .v2tb>.on,html body:not(.dc-shell) header #chips .v2tb>[aria-current=page]{color:var(--lk,#1b64da)!important;font-weight:700!important;box-shadow:inset 0 -3px 0 var(--lk,#1b64da)!important}
}
@media(min-width:1000px){
  html body header #chips{border-bottom:1px solid var(--ln,#eceef1)}
  html body header #chips .v2tb>*{padding:13px 0 12px!important;font-weight:500!important;color:var(--tx,#16181d)!important;box-shadow:none!important}
  html body header #chips .v2tb>.on,html body header #chips .v2tb>[aria-current=page]{color:var(--lk,#1b64da)!important;font-weight:700!important;box-shadow:inset 0 -3px 0 var(--lk,#1b64da)!important}
}

/* 랭킹 탭 행: 왼쪽 순위 번호(1~3위 붉은색) + 정보 줄 맨 앞 조회 칩 (DCLIST 1) */
html body #feed .item>.rank-no{flex:none;width:20px;padding:0!important;white-space:nowrap;font-size:19px;font-weight:700;line-height:28px;color:var(--t3,#6b7280)}
html body #feed .item>.rank-no.top{color:var(--pt,#d92d20)}
html body #feed .item>.rank-no+.body{flex:1;min-width:0}
#feed .item .rank-views{padding:1px 6px;border-radius:3px;background:color-mix(in srgb,var(--pt,#d92d20) 12%,transparent);color:var(--pt,#d92d20);font-size:14px}
/* PC에서는 왼쪽 메뉴에 영상이 있으므로 홈 탭에서는 숨긴다 */
@media(min-width:1000px){html body header #chips .v2tb>a[href="#/shorts"]{display:none!important}}

/* 목록 행 크기: 디시인사이드 안드로이드 앱 5.3.20(view_post_list_item_basic)의 실제 값. 제목 15, 정보 줄 12, 위아래 8, 제목-정보 3 (dp=px) */
html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id]{padding:8px 16px 8px!important}
html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id] .title,html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id] .title .list-title-text{font-size:max(14px,calc(var(--reading-list-size,16px) - 1px))!important;line-height:1.35!important}
html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id] .list-comment-count{font-size:13px!important;line-height:1.35!important}
html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id] .hf-list-meta,html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id] .hf-list-meta *{font-size:12px!important;line-height:1.35!important}
html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id] .hf-list-meta{margin-top:2px!important}
/* 썸네일 38px: 썸네일 유무와 상관없이 모든 줄이 54px (8 + 38 + 8) */
html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id] .body:has(.thumb){grid-template-columns:minmax(0,1fr) 38px!important;column-gap:12px!important}
html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id] .body .thumb{width:38px!important;height:38px!important;min-height:38px!important;max-height:38px!important;margin:0!important;border-radius:12px!important;background:var(--thb)!important}
html:root body:is([data-feed-view=thumb],[data-feed-view=board],.in-search,:has(#meBox)) :is(#feed,#sres,#portalBody,#channelFeed:not(.channel-media-grid),#subscribedFeed,.reading-related,.channel-search-results,#meBox) .hf-list-row.item[data-id] .body .thumb :is(img,video){width:38px!important;height:38px!important;min-height:38px!important;max-height:38px!important}
/* 채널 화면 (시안 17, 일반 채널 기준): 설명 아래 간격, 탭 40px, 글 N개 줄, 공지 띠 */
html body #featureBody.handoff-channel-page .channel-screen-tabs{margin-top:10px!important}
html body #featureBody.handoff-channel-page .channel-screen-tabs>button{height:40px!important;padding:12px 0!important;line-height:16px!important}
html body #featureBody.handoff-channel-page .channel-meta:not(.is-info){padding:22px 16px 16px!important}
html body #featureBody.handoff-channel-page #channelPostCount{font-weight:500!important}
html body #featureBody.handoff-channel-page #channelSort{line-height:15px!important}
html body #featureBody.handoff-channel-page .channel-screen-tabs>button[aria-selected=true]{box-shadow:inset 0 -3px var(--lk)!important}
html:root body .channel-notice-strip .notice-chev{display:flex;align-items:center;font-size:16px;line-height:1}
