/* V3.1.6.6 — scoped marketplace gallery, no global overrides. */
#view-world,#view-world .world-list-column,[data-student-view-panel="world"]{min-width:0}
#view-world .world-dashboard-hero,.student-world-hero{min-height:0!important;padding:20px 24px!important;align-items:center!important;margin-bottom:16px!important;overflow:hidden}
#view-world .world-dashboard-hero .hero-copy{max-width:none!important;flex:1!important}
#view-world .world-dashboard-hero .hero-visual,.student-world-hero-art{display:none!important}
#view-world .world-dashboard-hero .eyebrow,.student-world-hero .eyebrow{display:none!important}
#view-world .world-dashboard-hero h2,.student-world-hero h1{font-size:clamp(22px,3vw,29px)!important;margin:0 0 5px!important}
#view-world .world-dashboard-hero p,.student-world-hero p{font-size:13px!important;margin:0 0 8px!important;line-height:1.5!important}
#view-world .world-dashboard-hero .hero-actions{margin-top:9px!important;gap:8px!important;flex-wrap:wrap}
#view-world .sc31653-discovery{padding:14px!important;margin-bottom:18px!important}
#view-world .sc31653-heading{margin-bottom:10px!important}
#view-world .sc31653-mode-grid>button{min-height:68px!important}
#view-world :is(#worldSpacesPanel,#worldWorksPanel,#worldProjectsPanel)>.section-head{margin:0 0 10px!important;min-height:0!important}
#view-world :is(#worldSpacesPanel,#worldWorksPanel,#worldProjectsPanel)>.section-head p{display:none!important}
.student-world-mode-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin:12px 0 18px!important}
.student-world-mode-tabs button{display:flex!important;align-items:center;justify-content:center;min-width:0!important;min-height:64px!important;gap:7px!important;padding:8px!important;white-space:normal!important;border-radius:12px!important}
.student-world-mode-tabs button.active{background:#eaf5f3!important;border-color:#407c89!important;color:#245562!important}
.student-world-section-head small{display:none!important}
.sc3166-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0 0 10px}
.sc3166-count{font-size:13px;font-weight:700;color:#526c7b;white-space:nowrap}
.sc3166-bar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.sc3166-bar select,.sc3166-reset,.sc3166-filter select{background:#fff;border:1px solid #d3e0e5;border-radius:9px;font:inherit;font-size:13px;color:#344e5e;min-height:40px;padding:7px 10px;max-width:100%;min-width:0}
.sc3166-reset{cursor:pointer}
#view-world .sc3166-bar .density-toggle-v2710{display:inline-flex!important;margin:0!important;gap:3px}
#view-world .sc3166-bar .density-toggle-v2710 button{min-height:34px;font-size:12px!important}
.sc3166-filter,.sc3166-ranking{background:#fff!important;border:1px solid #dce6e9!important;border-radius:12px!important;padding:0 12px!important;margin:0 0 12px!important;min-width:0;box-shadow:none!important}
.sc3166-filter summary,.sc3166-ranking summary{cursor:pointer;min-height:44px;padding:10px 0;display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800;color:#365565;list-style:none}
.sc3166-filter summary::-webkit-details-marker,.sc3166-ranking summary::-webkit-details-marker{display:none}
.sc3166-filter summary::after,.sc3166-ranking summary::after{content:'⌄';margin-left:auto;font-size:17px;color:#567685}
.sc3166-filter[open] summary::after,.sc3166-ranking[open] summary::after{content:'⌃'}
.sc3166-filter summary span,.sc3166-ranking summary span{font-weight:600;font-size:11px;color:#617985}
.sc3166-filter[open],.sc3166-ranking[open]{padding-bottom:12px!important}
#view-world .sc3166-filter .edu-discovery-v2710,.sc3166-filter .edu-discovery-v2710{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr));gap:8px;padding:0!important;margin:0 0 10px!important;border:0!important;background:transparent!important}
#view-world .sc3166-filter .edu-discovery-v2710 select,.sc3166-filter select{width:100%;max-width:none!important;min-height:40px!important}
#view-world .sc3166-filter .world-discovery-toolbar{margin:0!important;padding:0!important;display:flex!important;flex-wrap:wrap;gap:8px}
#view-world .sc3166-filter .world-search-wrap{display:none!important}
#view-world .sc3166-filter .world-view-filter,.sc3166-filter .student-world-view-filter{margin:0 0 8px!important;max-width:100%}
#view-world .world-layout,.student-world-layout{display:flex!important;flex-direction:column!important;gap:0!important;min-width:0;align-items:stretch!important}
#view-world .world-layout>.world-list-column,.student-world-layout>div{width:100%!important;min-width:0}
#view-world .world-layout>.sc3166-ranking,.student-world-layout>.sc3166-ranking{display:block!important;order:-1;position:static!important;width:100%!important;max-width:none!important}
.sc3166-ranking[open]>div{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(235px,100%),1fr));gap:5px 14px}
.sc3166-ranking .popular-space-item{width:100%;min-height:44px!important;min-width:0!important;padding:8px 4px!important;gap:8px!important}
.sc3166-ranking .popular-space-info{min-width:0!important}
.sc3166-ranking .popular-space-info b{font-size:13px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sc3166-ranking .popular-count{font-size:12px!important}
/* Grid responds to actual available content width, not entire browser width. */
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .world-works-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(min(224px,100%),1fr))!important;grid-auto-rows:auto!important;gap:14px!important;align-items:stretch!important}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .world-work-card.sc3166-work{display:flex!important;flex-direction:column!important;align-self:stretch!important;min-width:0!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;padding:0!important;margin:0!important;overflow:hidden!important;border:1px solid #dce5e9!important;border-radius:14px!important;background:#fff!important;box-shadow:0 2px 8px #2845550a!important;--card-control-height:36px;--card-control-gap:6px;transition:border-color .15s,box-shadow .15s}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .world-work-card.sc3166-work:hover{border-color:#9db9c2!important;box-shadow:0 4px 16px #28455512!important;transform:none!important}
.sc3166-cover{position:relative;flex:0 0 auto;min-width:0;overflow:hidden;background:#e6efed}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-cover .sc3165-world-card-image{aspect-ratio:16/9!important;width:100%!important;height:auto!important;max-height:none!important;display:block!important}
.sc3166-cover-open{position:absolute;inset:0;border:0;background:transparent;cursor:pointer;border-radius:0;z-index:1}
.sc3166-cover-open:hover{background:#123e4c10}
.sc3166-type{position:absolute;top:9px;left:9px;background:#fffef9ed;color:#35515e;padding:5px 8px;border-radius:6px;font-size:11px;font-weight:800;z-index:2;pointer-events:none}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work .world-work-content{padding:12px!important;gap:6px!important;display:flex!important;flex-direction:column!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;min-width:0!important}
.sc3166-title-row{display:flex;align-items:flex-start;gap:5px;min-width:0}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work h4{font-size:calc(15px * var(--site-font-scale,1))!important;line-height:1.35!important;font-weight:800!important;color:#294653!important;min-height:0!important;max-height:none!important;min-width:0;flex:1 1 auto!important;margin:0!important;overflow-wrap:anywhere;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important}
.sc3166-work .world-work-mini-actions{display:flex!important;flex:0 0 auto!important;gap:3px!important;margin:0!important;align-self:flex-start}
.sc3166-work .world-work-mini-actions:empty{display:none!important}
.sc3166-work .world-work-mini-actions button{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important;border-radius:7px!important;display:grid!important;place-items:center;padding:0!important}
:is(#worldWorksBody,#studentWorldWorksBody) .sc3166-work .world-work-meta{display:flex!important;justify-content:space-between!important;gap:6px!important;font-size:11px!important;line-height:1.4!important;color:#607986!important;white-space:nowrap;max-height:none!important;overflow:visible!important}
.sc3166-work .world-work-meta>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}
.sc3166-work .world-work-meta>span:last-child{flex:0 0 auto}
:is(#worldWorksBody,#studentWorldWorksBody) .sc3166-work .world-work-heat-row{margin:0!important;min-height:0!important}
:is(#worldWorksBody,#studentWorldWorksBody) .sc3166-work p{font-size:12px!important;line-height:1.45!important;color:#5e7480!important;margin:0!important;overflow-wrap:anywhere;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;max-height:2.9em!important}
:is(#worldWorksBody,#studentWorldWorksBody) .sc3166-work :is(.work-school-meta,.world-work-tags){display:flex!important;flex-wrap:wrap!important;gap:4px!important;max-height:none!important;margin:0!important;overflow:visible!important;min-height:0!important}
.sc3166-work .world-work-tags button,.sc3166-work .work-school-meta span{font-size:11px!important;line-height:1.3!important;padding:4px 7px!important;max-width:100%;overflow-wrap:anywhere;white-space:normal!important}
.sc3166-work .edu278-insights{margin:0!important}
.sc3166-card-bottom{margin-top:auto;padding-top:5px;min-width:0}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work .v282-feedback-row{position:static!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin:0 0 6px!important;padding:5px 0 0!important;border-top:1px solid #edf1f3!important}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work .v282-feedback-row>button{position:static!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:34px!important;max-height:none!important;padding:5px 6px!important;font-size:11px!important;color:#536c7b!important;background:#f7fafb!important;border:1px solid #e0e8ec!important;border-radius:8px!important}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work .v282-feedback-row>.v283-owner-feedback{flex:0 0 34px!important;min-width:34px!important}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work :is(.world-work-actions,.project-compact-actions-v2637){display:flex!important;gap:6px!important;padding:0!important;margin:0!important;border:0!important;min-width:0!important;max-height:none!important;height:auto!important;flex-wrap:wrap!important}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work :is(.world-work-actions,.project-compact-actions-v2637)>button{flex:1 1 auto!important;width:auto!important;min-width:0!important;min-height:38px!important;height:auto!important;max-height:none!important;background:#fff!important;color:#365565!important;border:1px solid #d6e1e6!important;font-size:12px!important;font-weight:750!important;padding:7px 6px!important;border-radius:8px!important;white-space:nowrap!important}
:is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work .world-work-actions>.sc3166-primary,:is(#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work .project-compact-actions-v2637>button:first-child{background:#bf5525!important;border-color:#bf5525!important;color:white!important}
:is(#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work :is(.project-compact-top-v2637,.project-compact-sub-v2637){min-height:0!important;max-height:none!important;flex-wrap:wrap!important;font-size:12px!important}
#worldWorksBody.work-list-v2710 .world-works-grid{grid-template-columns:1fr!important}
#worldWorksBody.work-list-v2710 .sc3166-work{display:grid!important;grid-template-columns:minmax(120px,220px) minmax(0,1fr);align-items:start!important}
#worldWorksBody.work-list-v2710 .sc3166-cover{margin:12px;border-radius:8px}
#worldWorksBody.work-list-v2710 .sc3166-work .world-work-content{padding-left:0!important}
/* Site/nest cards remain intact but use consistent spacing and readable headings. */
#worldHallBody .world-card,#studentWorldHallBody .world-card{min-width:0!important;max-width:100%!important;background:#fff!important;border:1px solid #dce5e9!important;border-radius:14px!important;box-shadow:0 2px 8px #2845550a!important;padding:16px!important}
#worldHallBody .world-card h4,#studentWorldHallBody .world-card h4{font-size:18px!important;overflow-wrap:anywhere}
#worldHallBody .world-top-title small,#studentWorldHallBody .world-top-title small{display:none!important}
#view-world :is(button,input,select,summary):focus-visible,[data-student-view-panel="world"] :is(button,input,select,summary):focus-visible{outline:3px solid #397b83!important;outline-offset:2px}
@media(max-width:860px){
 #view-world .world-dashboard-hero,.student-world-hero{padding:16px!important}
 #view-world .sc31653-mode-grid>button{min-height:76px!important}
 .sc3166-bar select,.sc3166-reset,.sc3166-filter select{min-height:44px!important;font-size:16px!important}
 :is(#worldWorksBody,#studentWorldWorksBody,#worldProjectsBody,#studentWorldProjectsBody) .sc3166-work :is(.world-work-actions,.project-compact-actions-v2637,.v282-feedback-row)>button{min-height:44px!important}
 .sc3166-work .world-work-mini-actions button{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}
 .student-world-mode-tabs button{flex-direction:column;gap:4px!important;font-size:12px!important}
 .student-world-mode-tabs button em{font-size:11px!important}
 .student-world-search input{font-size:16px!important;min-height:44px!important}
}
@media(max-width:540px){#worldWorksBody.work-list-v2710 .sc3166-work{display:flex!important}#worldWorksBody.work-list-v2710 .sc3166-cover{margin:0!important;border-radius:0}#worldWorksBody.work-list-v2710 .sc3166-work .world-work-content{padding:12px!important}#view-world .sc31653-mode-grid>button{min-height:82px!important}#view-world .sc31653-heading{display:none!important}.student-world-mode-tabs button b{font-size:12px!important}.sc3166-bar{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.sc3166-work{transition:none!important}}
/* Explicit TC sans fallback for environments without the webfont. */
#view-world,[data-student-view-panel="world"]{font-family:Inter,"Noto Sans TC","Noto Sans CJK TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif!important}
#view-world button,#view-world input,#view-world select,[data-student-view-panel="world"] button,[data-student-view-panel="world"] input,[data-student-view-panel="world"] select{font-family:inherit!important}
